@Service public class LdapIdentityProvider extends Object implements org.apache.jackrabbit.oak.spi.security.authentication.external.ExternalIdentityProvider
LdapIdentityProvider implements an external identity provider that reads users and groups from an ldap
source.
Please refer to LdapProviderConfig for configuration options.| Constructor and Description |
|---|
LdapIdentityProvider()
Default constructor for OSGi
|
LdapIdentityProvider(LdapProviderConfig config)
Constructor for non-OSGi cases.
|
| Modifier and Type | Method and Description |
|---|---|
org.apache.jackrabbit.oak.spi.security.authentication.external.ExternalUser |
authenticate(Credentials credentials) |
void |
close()
Closes this provider and releases the internal pool.
|
String |
createDNPath(org.apache.directory.api.ldap.model.name.Dn dn)
Makes the intermediate path of an DN by splitting along the RDNs
|
Map<String,org.apache.jackrabbit.oak.spi.security.authentication.external.ExternalIdentityRef> |
getDeclaredGroupRefs(org.apache.jackrabbit.oak.spi.security.authentication.external.ExternalIdentityRef ref)
Collects the declared (direct) groups of an identity
|
Map<String,org.apache.jackrabbit.oak.spi.security.authentication.external.ExternalIdentityRef> |
getDeclaredMemberRefs(org.apache.jackrabbit.oak.spi.security.authentication.external.ExternalIdentityRef ref)
Collects the declared (direct) members of a group
|
org.apache.jackrabbit.oak.spi.security.authentication.external.ExternalGroup |
getGroup(String name) |
org.apache.jackrabbit.oak.spi.security.authentication.external.ExternalIdentity |
getIdentity(org.apache.jackrabbit.oak.spi.security.authentication.external.ExternalIdentityRef ref) |
String |
getName() |
org.apache.jackrabbit.oak.spi.security.authentication.external.ExternalUser |
getUser(String userId) |
Iterator<org.apache.jackrabbit.oak.spi.security.authentication.external.ExternalGroup> |
listGroups() |
Iterator<org.apache.jackrabbit.oak.spi.security.authentication.external.ExternalUser> |
listUsers() |
public LdapIdentityProvider()
public LdapIdentityProvider(LdapProviderConfig config)
config - the configurationpublic void close()
@Nonnull public String getName()
getName in interface org.apache.jackrabbit.oak.spi.security.authentication.external.ExternalIdentityProviderpublic org.apache.jackrabbit.oak.spi.security.authentication.external.ExternalIdentity getIdentity(@Nonnull org.apache.jackrabbit.oak.spi.security.authentication.external.ExternalIdentityRef ref) throws org.apache.jackrabbit.oak.spi.security.authentication.external.ExternalIdentityException
getIdentity in interface org.apache.jackrabbit.oak.spi.security.authentication.external.ExternalIdentityProviderorg.apache.jackrabbit.oak.spi.security.authentication.external.ExternalIdentityExceptionpublic org.apache.jackrabbit.oak.spi.security.authentication.external.ExternalUser getUser(@Nonnull String userId) throws org.apache.jackrabbit.oak.spi.security.authentication.external.ExternalIdentityException
getUser in interface org.apache.jackrabbit.oak.spi.security.authentication.external.ExternalIdentityProviderorg.apache.jackrabbit.oak.spi.security.authentication.external.ExternalIdentityExceptionpublic org.apache.jackrabbit.oak.spi.security.authentication.external.ExternalGroup getGroup(@Nonnull String name) throws org.apache.jackrabbit.oak.spi.security.authentication.external.ExternalIdentityException
getGroup in interface org.apache.jackrabbit.oak.spi.security.authentication.external.ExternalIdentityProviderorg.apache.jackrabbit.oak.spi.security.authentication.external.ExternalIdentityExceptionpublic Iterator<org.apache.jackrabbit.oak.spi.security.authentication.external.ExternalUser> listUsers() throws org.apache.jackrabbit.oak.spi.security.authentication.external.ExternalIdentityException
listUsers in interface org.apache.jackrabbit.oak.spi.security.authentication.external.ExternalIdentityProviderorg.apache.jackrabbit.oak.spi.security.authentication.external.ExternalIdentityExceptionpublic Iterator<org.apache.jackrabbit.oak.spi.security.authentication.external.ExternalGroup> listGroups() throws org.apache.jackrabbit.oak.spi.security.authentication.external.ExternalIdentityException
listGroups in interface org.apache.jackrabbit.oak.spi.security.authentication.external.ExternalIdentityProviderorg.apache.jackrabbit.oak.spi.security.authentication.external.ExternalIdentityExceptionpublic org.apache.jackrabbit.oak.spi.security.authentication.external.ExternalUser authenticate(@Nonnull Credentials credentials) throws org.apache.jackrabbit.oak.spi.security.authentication.external.ExternalIdentityException, LoginException
authenticate in interface org.apache.jackrabbit.oak.spi.security.authentication.external.ExternalIdentityProviderorg.apache.jackrabbit.oak.spi.security.authentication.external.ExternalIdentityExceptionLoginExceptionpublic Map<String,org.apache.jackrabbit.oak.spi.security.authentication.external.ExternalIdentityRef> getDeclaredGroupRefs(org.apache.jackrabbit.oak.spi.security.authentication.external.ExternalIdentityRef ref) throws org.apache.jackrabbit.oak.spi.security.authentication.external.ExternalIdentityException
ref - reference to the identityorg.apache.jackrabbit.oak.spi.security.authentication.external.ExternalIdentityExceptionpublic Map<String,org.apache.jackrabbit.oak.spi.security.authentication.external.ExternalIdentityRef> getDeclaredMemberRefs(org.apache.jackrabbit.oak.spi.security.authentication.external.ExternalIdentityRef ref) throws org.apache.jackrabbit.oak.spi.security.authentication.external.ExternalIdentityException
ref - the reference to the grouporg.apache.jackrabbit.oak.spi.security.authentication.external.ExternalIdentityException - if an error occurspublic String createDNPath(org.apache.directory.api.ldap.model.name.Dn dn)
dn - the dn of the identitynull if disabled by configCopyright © 2012-2015 The Apache Software Foundation. All Rights Reserved.