Class LdapIdentity
- java.lang.Object
-
- org.apache.jackrabbit.oak.security.authentication.ldap.impl.LdapIdentity
-
- All Implemented Interfaces:
ExternalIdentity
public abstract class LdapIdentity extends Object implements ExternalIdentity
Implements an identity that is provided by theLdapIdentityProvider.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.directory.api.ldap.model.entry.Entryentryprotected Stringidprotected Stringpathprotected LdapIdentityProviderproviderprotected ExternalIdentityRefref
-
Constructor Summary
Constructors Modifier Constructor Description protectedLdapIdentity(LdapIdentityProvider provider, ExternalIdentityRef ref, String id, String path, org.apache.directory.api.ldap.model.entry.Entry entry)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull Iterable<ExternalIdentityRef>getDeclaredGroups()Returns an iterable of the declared groups of this external identity.org.apache.directory.api.ldap.model.entry.EntrygetEntry()@NotNull ExternalIdentityRefgetExternalId()Returns the id of this identity as used in the external system.@NotNull StringgetId()Returns the local id of this identity as it would be used in this repository.StringgetIntermediatePath()Returns the desired intermediate relative path of the authorizable to be created.@NotNull StringgetPrincipalName()Returns the DN as principal name.@NotNull Map<String,Object>getProperties()Returns a map of properties of this external identity.StringtoString()
-
-
-
Field Detail
-
provider
protected final LdapIdentityProvider provider
-
ref
protected final ExternalIdentityRef ref
-
id
protected final String id
-
path
protected final String path
-
entry
protected final org.apache.directory.api.ldap.model.entry.Entry entry
-
-
Constructor Detail
-
LdapIdentity
protected LdapIdentity(LdapIdentityProvider provider, ExternalIdentityRef ref, String id, String path, org.apache.directory.api.ldap.model.entry.Entry entry)
-
-
Method Detail
-
getEntry
public org.apache.directory.api.ldap.model.entry.Entry getEntry()
-
getExternalId
@NotNull public @NotNull ExternalIdentityRef getExternalId()
Returns the id of this identity as used in the external system.- Specified by:
getExternalIdin interfaceExternalIdentity- Returns:
- the external id.
-
getId
@NotNull public @NotNull String getId()
Returns the local id of this identity as it would be used in this repository. This usually corresponds toAuthorizable.getID()- Specified by:
getIdin interfaceExternalIdentity- Returns:
- the internal id.
-
getPrincipalName
@NotNull public @NotNull String getPrincipalName()
Returns the DN as principal name.- Specified by:
getPrincipalNamein interfaceExternalIdentity- Returns:
- the DN
-
getIntermediatePath
public String getIntermediatePath()
Returns the desired intermediate relative path of the authorizable to be created. For example, one could map an external hierarchy into the local users and groups hierarchy. The provider must escape all characters so that the path is a valid JCR path. The path is always considered relative, even if it starts with a '/'.- Specified by:
getIntermediatePathin interfaceExternalIdentity- Returns:
- the intermediate path or
nullor empty.
-
getDeclaredGroups
@NotNull public @NotNull Iterable<ExternalIdentityRef> getDeclaredGroups() throws ExternalIdentityException
Returns an iterable of the declared groups of this external identity.- Specified by:
getDeclaredGroupsin interfaceExternalIdentity- Returns:
- the declared groups
- Throws:
ExternalIdentityException- if an error occurs
-
getProperties
@NotNull public @NotNull Map<String,Object> getProperties()
Returns a map of properties of this external identity.- Specified by:
getPropertiesin interfaceExternalIdentity- Returns:
- the properties
-
-