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.Entry
entry
protected String
id
protected String
path
protected LdapIdentityProvider
provider
protected ExternalIdentityRef
ref
-
Constructor Summary
Constructors Modifier Constructor Description protected
LdapIdentity(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.Entry
getEntry()
@NotNull ExternalIdentityRef
getExternalId()
Returns the id of this identity as used in the external system.@NotNull String
getId()
Returns the local id of this identity as it would be used in this repository.String
getIntermediatePath()
Returns the desired intermediate relative path of the authorizable to be created.@NotNull String
getPrincipalName()
Returns the DN as principal name.@NotNull Map<String,Object>
getProperties()
Returns a map of properties of this external identity.String
toString()
-
-
-
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:
getExternalId
in 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:
getId
in interfaceExternalIdentity
- Returns:
- the internal id.
-
getPrincipalName
@NotNull public @NotNull String getPrincipalName()
Returns the DN as principal name.- Specified by:
getPrincipalName
in 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:
getIntermediatePath
in interfaceExternalIdentity
- Returns:
- the intermediate path or
null
or empty.
-
getDeclaredGroups
@NotNull public @NotNull Iterable<ExternalIdentityRef> getDeclaredGroups() throws ExternalIdentityException
Returns an iterable of the declared groups of this external identity.- Specified by:
getDeclaredGroups
in 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:
getProperties
in interfaceExternalIdentity
- Returns:
- the properties
-
-