Class DefaultSyncConfig.Authorizable
java.lang.Object
org.apache.jackrabbit.oak.spi.security.authentication.external.basic.DefaultSyncConfig.Authorizable
- Direct Known Subclasses:
DefaultSyncConfig.Group,DefaultSyncConfig.User
- Enclosing class:
DefaultSyncConfig
Base config class for users and groups
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the values configured withsetAutoMembership(String...).getAutoMembership(Authorizable authorizable) Defines the set of group ids a synchronized external user/group is automatically member of.@NotNull AutoMembershipConfigGets theAutoMembershipConfigthat applies to this configuration.longReturns the duration in milliseconds until a synced authorizable gets expired.@NotNull StringDefines the authorizables intermediate path prefix that is used when creating new authorizables.Defines the mapping of internal property names from external values.booleanReturns true if new AuthorizableIDs will be normalized according to the UsernameCaseMapped profile defined in RFC7613setApplyRFC7613UsernameCaseMapped(boolean applyRFC7613UsernameCaseMapped) Set to true if new AuthorizableIDs shall be normalized according to the UsernameCaseMapped profile defined in RFC7613.@NotNull DefaultSyncConfig.AuthorizablesetAutoMembership(@NotNull String... autoMembership) Sets the auto membership.@NotNull DefaultSyncConfig.AuthorizablesetAutoMembershipConfig(@NotNull AutoMembershipConfig autoMembershipConfig) Sets theAutoMembershipConfigurationthat applies to this configuration.@NotNull DefaultSyncConfig.AuthorizablesetExpirationTime(long expirationTime) Sets the expiration time.@NotNull DefaultSyncConfig.AuthorizablesetPathPrefix(@NotNull String pathPrefix) Sets the path prefix.@NotNull DefaultSyncConfig.AuthorizablesetPropertyMapping(@NotNull Map<String, String> propertyMapping) Sets the property mapping.
-
Constructor Details
-
Authorizable
public Authorizable()
-
-
Method Details
-
getExpirationTime
public long getExpirationTime()Returns the duration in milliseconds until a synced authorizable gets expired. An expired authorizable will be re-synced.- Returns:
- the expiration time in milliseconds.
-
setExpirationTime
Sets the expiration time.- Parameters:
expirationTime- time in milliseconds.- Returns:
this- See Also:
-
isApplyRFC7613UsernameCaseMapped
public boolean isApplyRFC7613UsernameCaseMapped()Returns true if new AuthorizableIDs will be normalized according to the UsernameCaseMapped profile defined in RFC7613- Returns:
- true if new AuthorizableIDs will be normalized.
-
setApplyRFC7613UsernameCaseMapped
public DefaultSyncConfig.Authorizable setApplyRFC7613UsernameCaseMapped(boolean applyRFC7613UsernameCaseMapped) Set to true if new AuthorizableIDs shall be normalized according to the UsernameCaseMapped profile defined in RFC7613.- Parameters:
applyRFC7613UsernameCaseMapped- true if the UsernameCaseMapped profile shall be used for normalization.- Returns:
this- See Also:
-
getAutoMembership
Returns the values configured withsetAutoMembership(String...). Note that this method only takes group names into account that have been configured usingsetAutoMembership(String...). In order to take advantage of the conditional auto-membership as defined withsetAutoMembershipConfig(AutoMembershipConfig), usegetAutoMembership(org.apache.jackrabbit.api.security.user.Authorizable)instead.- Returns:
- set of group names as defined with
setAutoMembership(String...)
-
setAutoMembership
@NotNull public @NotNull DefaultSyncConfig.Authorizable setAutoMembership(@NotNull @NotNull String... autoMembership) Sets the auto membership. Note that the passed group names will be trimmed and empty string values will be ignored (along withnullvalues).- Parameters:
autoMembership- the membership- Returns:
this- See Also:
-
getAutoMembershipConfig
Gets theAutoMembershipConfigthat applies to this configuration.- Returns:
this- See Also:
-
setAutoMembershipConfig
@NotNull public @NotNull DefaultSyncConfig.Authorizable setAutoMembershipConfig(@NotNull @NotNull AutoMembershipConfig autoMembershipConfig) Sets theAutoMembershipConfigurationthat applies to this configuration.- Returns:
this- See Also:
-
getAutoMembership
Defines the set of group ids a synchronized external user/group is automatically member of. In contrast togetAutoMembership()this method respects both values configured withsetAutoMembership(String...)and withsetAutoMembershipConfig(AutoMembershipConfig).- Returns:
- set of group ids.
-
getPropertyMapping
Defines the mapping of internal property names from external values. Only the external properties defined as keys of this map are synced with the mapped internal properties. note that the property names can be relative paths. the intermediate nodes will be created accordingly. Example:
The implicit properties like userid, groupname, password must not be mapped.{ "rep:fullname": "cn", "country", "c", "profile/email": "mail", "profile/givenName": "cn" }- Returns:
- the property mapping where the keys are the local property names and the values the external ones.
-
setPropertyMapping
@NotNull public @NotNull DefaultSyncConfig.Authorizable setPropertyMapping(@NotNull @NotNull Map<String, String> propertyMapping) Sets the property mapping.- Parameters:
propertyMapping- the mapping- Returns:
this- See Also:
-
getPathPrefix
Defines the authorizables intermediate path prefix that is used when creating new authorizables. This prefix is always prepended to the path provided by theExternalIdentity.- Returns:
- the intermediate path prefix.
-
setPathPrefix
@NotNull public @NotNull DefaultSyncConfig.Authorizable setPathPrefix(@NotNull @NotNull String pathPrefix) Sets the path prefix.- Parameters:
pathPrefix- the path prefix.- Returns:
this- See Also:
-