Class LdapProviderConfig.Identity
- java.lang.Object
-
- org.apache.jackrabbit.oak.security.authentication.ldap.impl.LdapProviderConfig.Identity
-
- Enclosing class:
- LdapProviderConfig
public class LdapProviderConfig.Identity extends 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 StringgetBaseDN()Configures the base DN for searches of this kind of identity@Nullable StringgetExtraFilter()Configures the extra LDAP filter that is appended to the internally computed filter when searching for identities.@NotNull StringgetIdAttribute()Configures the attribute that is used to identify this identity by id.@NotNull String[]getObjectClasses()Configures the object classes of this kind of identity.@NotNull StringgetSearchFilter(@NotNull String id)Returns the LDAP filter that is used when searching this type of identity.booleanmakeDnPath()Configures if the identities DN should be used to generate a portion of the authorizables intermediate path.@NotNull LdapProviderConfig.IdentitysetBaseDN(@NotNull String baseDN)Sets the base DN for search of this kind of identity.@NotNull LdapProviderConfig.IdentitysetExtraFilter(@Nullable String extraFilter)Sets the extra search filter.@NotNull LdapProviderConfig.IdentitysetIdAttribute(@NotNull String idAttribute)Sets the id attribute.@NotNull LdapProviderConfig.IdentitysetMakeDnPath(boolean makeDnPath)Sets the intermediate path flag.@NotNull LdapProviderConfig.IdentitysetObjectClasses(@NotNull String... objectClasses)Sets the object classes.StringtoString()
-
-
-
Method Detail
-
getBaseDN
@NotNull public @NotNull 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 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 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 String... objectClasses)
Sets the object classes.- Parameters:
objectClasses- the object classes- Returns:
this- See Also:
getObjectClasses()
-
getIdAttribute
@NotNull public @NotNull 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 String idAttribute)
Sets the id attribute.- Parameters:
idAttribute- the id attribute name- Returns:
this- See Also:
getIdAttribute()
-
getExtraFilter
@Nullable public @Nullable 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 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:
trueif the DN is used a intermediate path.
-
setMakeDnPath
@NotNull public @NotNull LdapProviderConfig.Identity setMakeDnPath(boolean makeDnPath)
Sets the intermediate path flag.- Parameters:
makeDnPath-trueto use the DN as intermediate path- Returns:
this- See Also:
makeDnPath()
-
getSearchFilter
@NotNull public @NotNull String getSearchFilter(@NotNull @NotNull 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
-
-