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 java.lang.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 java.util.Set<java.lang.String>
getAutoMembership()
Defines the set of group names that are automatically added to synced authorizable.long
getExpirationTime()
Returns the duration in milliseconds until a synced authorizable gets expired.@NotNull java.lang.String
getPathPrefix()
Defines the authorizables intermediate path prefix that is used when creating new authorizables.@NotNull java.util.Map<java.lang.String,java.lang.String>
getPropertyMapping()
Defines the mapping of internal property names from external values.boolean
isApplyRFC7613UsernameCaseMapped()
Returns true if new AuthorizableIDs will be normalized according to the UsernameCaseMapped profile defined in RFC7613DefaultSyncConfig.Authorizable
setApplyRFC7613UsernameCaseMapped(boolean applyRFC7613UsernameCaseMapped)
Set to true if new AuthorizableIDs shall be normalized according to the UsernameCaseMapped profile defined in RFC7613.@NotNull DefaultSyncConfig.Authorizable
setAutoMembership(@NotNull java.lang.String... autoMembership)
Sets the auto membership.@NotNull DefaultSyncConfig.Authorizable
setExpirationTime(long expirationTime)
Sets the expiration time.@NotNull DefaultSyncConfig.Authorizable
setPathPrefix(@NotNull java.lang.String pathPrefix)
Sets the path prefix.@NotNull DefaultSyncConfig.Authorizable
setPropertyMapping(@NotNull java.util.Map<java.lang.String,java.lang.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 java.util.Set<java.lang.String> getAutoMembership()
Defines the set of group names that are automatically added to synced authorizable.- Returns:
- set of group names.
-
setAutoMembership
@NotNull public @NotNull DefaultSyncConfig.Authorizable setAutoMembership(@NotNull @NotNull java.lang.String... autoMembership)
Sets the auto membership. Note that the passed group names will be trimmed and empty string values will be ignored (along withnull
values).- Parameters:
autoMembership
- the membership- Returns:
this
- See Also:
getAutoMembership()
-
getPropertyMapping
@NotNull public @NotNull java.util.Map<java.lang.String,java.lang.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 java.util.Map<java.lang.String,java.lang.String> propertyMapping)
Sets the property mapping.- Parameters:
propertyMapping
- the mapping- Returns:
this
- See Also:
getPropertyMapping()
-
getPathPrefix
@NotNull public @NotNull java.lang.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 java.lang.String pathPrefix)
Sets the path prefix.- Parameters:
pathPrefix
- the path prefix.- Returns:
this
- See Also:
getPathPrefix()
-
-