Search in sources :

Example 6 with LdapIdentityProvider

use of org.apache.jackrabbit.oak.security.authentication.ldap.impl.LdapIdentityProvider in project jackrabbit-oak by apache.

the class LdapLoginTestBase method createIDP.

@Override
protected ExternalIdentityProvider createIDP() {
    LdapProviderConfig cfg = new LdapProviderConfig().setName("ldap").setHostname("127.0.0.1").setPort(LDAP_SERVER.getPort()).setBindDN(ServerDNConstants.ADMIN_SYSTEM_DN).setBindPassword(InternalLdapServer.ADMIN_PW).setGroupMemberAttribute(InternalLdapServer.GROUP_MEMBER_ATTR);
    cfg.getUserConfig().setBaseDN(AbstractServer.EXAMPLE_DN).setObjectClasses("inetOrgPerson");
    cfg.getGroupConfig().setBaseDN(AbstractServer.EXAMPLE_DN).setObjectClasses(InternalLdapServer.GROUP_CLASS_ATTR);
    cfg.getAdminPoolConfig().setMaxActive(0);
    cfg.getUserPoolConfig().setMaxActive(0);
    return new LdapIdentityProvider(cfg);
}
Also used : LdapIdentityProvider(org.apache.jackrabbit.oak.security.authentication.ldap.impl.LdapIdentityProvider) LdapProviderConfig(org.apache.jackrabbit.oak.security.authentication.ldap.impl.LdapProviderConfig)

Aggregations

LdapIdentityProvider (org.apache.jackrabbit.oak.security.authentication.ldap.impl.LdapIdentityProvider)6 SimpleCredentials (javax.jcr.SimpleCredentials)4 ExternalUser (org.apache.jackrabbit.oak.spi.security.authentication.external.ExternalUser)4 Test (org.junit.Test)4 LdapProviderConfig (org.apache.jackrabbit.oak.security.authentication.ldap.impl.LdapProviderConfig)2