Class LdapProviderConfig.Identity
java.lang.Object
org.apache.jackrabbit.oak.security.authentication.ldap.impl.LdapProviderConfig.Identity
- Enclosing class:
- LdapProviderConfig
Defines the configuration of an identity (user or group).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull String
Configures the base DN for searches of this kind of identity@Nullable String
Configures the extra LDAP filter that is appended to the internally computed filter when searching for identities.@NotNull String
Configures the attribute that is used to identify this identity by id.@NotNull String[]
Configures the object classes of this kind of identity.@NotNull String
getSearchFilter
(@NotNull String id) Returns the LDAP filter that is used when searching this type of identity.boolean
Configures if the identities DN should be used to generate a portion of the authorizables intermediate path.@NotNull LdapProviderConfig.Identity
Sets the base DN for search of this kind of identity.@NotNull LdapProviderConfig.Identity
setExtraFilter
(@Nullable String extraFilter) Sets the extra search filter.@NotNull LdapProviderConfig.Identity
setIdAttribute
(@NotNull String idAttribute) Sets the id attribute.@NotNull LdapProviderConfig.Identity
setMakeDnPath
(boolean makeDnPath) Sets the intermediate path flag.@NotNull LdapProviderConfig.Identity
setObjectClasses
(@NotNull String... objectClasses) Sets the object classes.toString()
-
Constructor Details
-
Identity
public Identity()
-
-
Method Details
-
getBaseDN
Configures the base DN for searches of this kind of identity- Returns:
- the base DN
-
setBaseDN
Sets the base DN for search of this kind of identity.- Parameters:
baseDN
- the DN as string.- Returns:
this
- See Also:
-
getObjectClasses
Configures the object classes of this kind of identity.- Returns:
- an array of object classes
- See Also:
-
setObjectClasses
@NotNull public @NotNull LdapProviderConfig.Identity setObjectClasses(@NotNull @NotNull String... objectClasses) Sets the object classes.- Parameters:
objectClasses
- the object classes- Returns:
this
- See Also:
-
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:
-
setIdAttribute
@NotNull public @NotNull LdapProviderConfig.Identity setIdAttribute(@NotNull @NotNull String idAttribute) Sets the id attribute.- Parameters:
idAttribute
- the id attribute name- Returns:
this
- See Also:
-
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 String extraFilter) Sets the extra search filter.- Parameters:
extraFilter
- the filter- Returns:
this
- See Also:
-
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
Sets the intermediate path flag.- Parameters:
makeDnPath
-true
to use the DN as intermediate path- Returns:
this
- See Also:
-
getSearchFilter
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
-