JBoss Community Archive (Read Only)

PicketLink

LDAPIdentityStore

LDAP Identity Store Configuration

LDAPIdentityStoreConfiguration config = new LDAPIdentityStoreConfiguration();
config.setBaseDN(BASE_DN).setBindDN("uid=admin,ou=system").setBindCredential("secret").setLdapURL(LDAP_URL)
    .setUserDNSuffix(USER_DN_SUFFIX).setRoleDNSuffix(ROLES_DN_SUFFIX).setAgentDNSuffix(AGENT_DN_SUFFIX)
    .setGroupDNSuffix(GROUP_DN_SUFFIX);
config.addGroupMapping("/QA Group", "ou=QA,dc=jboss,dc=org");

FeatureSet.addFeatureSupport(config.getFeatureSet(), FeatureGroup.agent, FeatureGroup.user, FeatureGroup.group,
                FeatureGroup.role, FeatureGroup.relationship, FeatureGroup.credential);
config.getFeatureSet().setSupportsCustomRelationships(false);
config.getFeatureSet().setSupportsMultiRealm(false);

return config;

Above, we show an example of creating an LDAPIdentityStoreConfiguration.

LDAP based IdentityManager

IdentityConfiguration config = new IdentityConfiguration();

config.addStoreConfiguration(getConfiguration());

IdentityManager identityManager = new DefaultIdentityManager();

identityManager.bootstrap(config, new DefaultIdentityStoreInvocationContextFactory(null));

The getConfiguration() method returns an instance of LDAPIdentityStoreConfiguration.

JBoss.org Content Archive (Read Only), exported from JBoss Community Documentation Editor at 2020-03-11 12:19:14 UTC, last content change 2013-03-07 22:04:59 UTC.