Class LdapProviderConfig.Identity
- java.lang.Object
-
- org.apache.jackrabbit.oak.security.authentication.ldap.impl.LdapProviderConfig.Identity
-
- Enclosing class:
- LdapProviderConfig
public class LdapProviderConfig.Identity extends java.lang.Object
Defines the configuration of an identity (user or group).
-
-
Constructor Summary
Constructors Constructor Description Identity()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull java.lang.String
getBaseDN()
Configures the base DN for searches of this kind of identity@Nullable java.lang.String
getExtraFilter()
Configures the extra LDAP filter that is appended to the internally computed filter when searching for identities.@NotNull java.lang.String
getIdAttribute()
Configures the attribute that is used to identify this identity by id.@NotNull java.lang.String[]
getObjectClasses()
Configures the object classes of this kind of identity.@NotNull java.lang.String
getSearchFilter(@NotNull java.lang.String id)
Returns the LDAP filter that is used when searching this type of identity.boolean
makeDnPath()
Configures if the identities DN should be used to generate a portion of the authorizables intermediate path.@NotNull LdapProviderConfig.Identity
setBaseDN(@NotNull java.lang.String baseDN)
Sets the base DN for search of this kind of identity.@NotNull LdapProviderConfig.Identity
setExtraFilter(@Nullable java.lang.String extraFilter)
Sets the extra search filter.@NotNull LdapProviderConfig.Identity
setIdAttribute(@NotNull java.lang.String idAttribute)
Sets the id attribute.@NotNull LdapProviderConfig.Identity
setMakeDnPath(boolean makeDnPath)
Sets the intermediate path flag.@NotNull LdapProviderConfig.Identity
setObjectClasses(@NotNull java.lang.String... objectClasses)
Sets the object classes.java.lang.String
toString()
-
-
-
Method Detail
-
getBaseDN
@NotNull public @NotNull java.lang.String getBaseDN()
Configures the base DN for searches of this kind of identity- Returns:
- the base DN
-
setBaseDN
@NotNull public @NotNull LdapProviderConfig.Identity setBaseDN(@NotNull @NotNull java.lang.String baseDN)
Sets the base DN for search of this kind of identity.- Parameters:
baseDN
- the DN as string.- Returns:
this
- See Also:
getBaseDN()
-
getObjectClasses
@NotNull public @NotNull java.lang.String[] getObjectClasses()
Configures the object classes of this kind of identity.- Returns:
- an array of object classes
- See Also:
for more detail about searching and filtering
-
setObjectClasses
@NotNull public @NotNull LdapProviderConfig.Identity setObjectClasses(@NotNull @NotNull java.lang.String... objectClasses)
Sets the object classes.- Parameters:
objectClasses
- the object classes- Returns:
this
- See Also:
getObjectClasses()
-
getIdAttribute
@NotNull public @NotNull java.lang.String getIdAttribute()
Configures the attribute that is used to identify this identity by id. For users this is the attribute that holds the user id, for groups this is the attribute that holds the group name.- Returns:
- the id attribute name
- See Also:
for more detail about searching and filtering
-
setIdAttribute
@NotNull public @NotNull LdapProviderConfig.Identity setIdAttribute(@NotNull @NotNull java.lang.String idAttribute)
Sets the id attribute.- Parameters:
idAttribute
- the id attribute name- Returns:
this
- See Also:
getIdAttribute()
-
getExtraFilter
@Nullable public @Nullable java.lang.String getExtraFilter()
Configures the extra LDAP filter that is appended to the internally computed filter when searching for identities.- Returns:
- the extra filter
-
setExtraFilter
@NotNull public @NotNull LdapProviderConfig.Identity setExtraFilter(@Nullable @Nullable java.lang.String extraFilter)
Sets the extra search filter.- Parameters:
extraFilter
- the filter- Returns:
this
- See Also:
getExtraFilter()
-
makeDnPath
public boolean makeDnPath()
Configures if the identities DN should be used to generate a portion of the authorizables intermediate path.- Returns:
true
if the DN is used a intermediate path.
-
setMakeDnPath
@NotNull public @NotNull LdapProviderConfig.Identity setMakeDnPath(boolean makeDnPath)
Sets the intermediate path flag.- Parameters:
makeDnPath
-true
to use the DN as intermediate path- Returns:
this
- See Also:
makeDnPath()
-
getSearchFilter
@NotNull public @NotNull java.lang.String getSearchFilter(@NotNull @NotNull java.lang.String id)
Returns the LDAP filter that is used when searching this type of identity. The filter is based on the configuration and has the following format:
Note that the objectclass part is repeated according to the specified objectclasses in(&(${idAttr}=${id})(objectclass=${objectclass})${extraFilter})
getObjectClasses()
.- Parameters:
id
- the id value- Returns:
- the search filter
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-