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
public abstract static class DefaultSyncConfig.Authorizable extends Object
Base config class for users and groups
-
-
Constructor Summary
Constructors Constructor Description Authorizable()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull Set<String>getAutoMembership()Returns the values configured withsetAutoMembership(String...).@NotNull Set<String>getAutoMembership(Authorizable authorizable)Defines the set of group ids a synchronized external user/group is automatically member of.@NotNull AutoMembershipConfiggetAutoMembershipConfig()Gets theAutoMembershipConfigthat applies to this configuration.longgetExpirationTime()Returns the duration in milliseconds until a synced authorizable gets expired.@NotNull StringgetPathPrefix()Defines the authorizables intermediate path prefix that is used when creating new authorizables.@NotNull Map<String,String>getPropertyMapping()Defines the mapping of internal property names from external values.booleanisApplyRFC7613UsernameCaseMapped()Returns true if new AuthorizableIDs will be normalized according to the UsernameCaseMapped profile defined in RFC7613DefaultSyncConfig.AuthorizablesetApplyRFC7613UsernameCaseMapped(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.
-
-
-
Method Detail
-
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
@NotNull public @NotNull DefaultSyncConfig.Authorizable setExpirationTime(long expirationTime)
Sets the expiration time.- Parameters:
expirationTime- time in milliseconds.- Returns:
this- See Also:
getExpirationTime()
-
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:
isApplyRFC7613UsernameCaseMapped()
-
getAutoMembership
@NotNull public @NotNull Set<String> 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:
getAutoMembership()
-
getAutoMembershipConfig
@NotNull public @NotNull AutoMembershipConfig getAutoMembershipConfig()
Gets theAutoMembershipConfigthat applies to this configuration.
-
setAutoMembershipConfig
@NotNull public @NotNull DefaultSyncConfig.Authorizable setAutoMembershipConfig(@NotNull @NotNull AutoMembershipConfig autoMembershipConfig)
Sets theAutoMembershipConfigurationthat applies to this configuration.- Returns:
this- See Also:
getAutoMembershipConfig(),getAutoMembership(org.apache.jackrabbit.api.security.user.Authorizable)
-
getAutoMembership
@NotNull public @NotNull Set<String> getAutoMembership(@NotNull Authorizable authorizable)
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
@NotNull public @NotNull Map<String,String> 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:
getPropertyMapping()
-
getPathPrefix
@NotNull public @NotNull String 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:
getPathPrefix()
-
-