Class SimpleCredentialsSupport
- java.lang.Object
-
- org.apache.jackrabbit.oak.spi.security.authentication.credentials.SimpleCredentialsSupport
-
- All Implemented Interfaces:
CredentialsSupport
public final class SimpleCredentialsSupport extends java.lang.Object implements CredentialsSupport
Implementation of theCredentialsSupport
interface that handlesSimpleCredentials
.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull java.util.Map<java.lang.String,?>
getAttributes(@NotNull Credentials credentials)
Obtains the attributes as present with the specifiedCredentials
.@NotNull java.util.Set<java.lang.Class>
getCredentialClasses()
Returns allcredentials
classes supported by this implementation.static CredentialsSupport
getInstance()
@Nullable java.lang.String
getUserId(@NotNull Credentials credentials)
Retrieves the user identifier from the specifiedCredentials
.boolean
setAttributes(@NotNull Credentials credentials, @NotNull java.util.Map<java.lang.String,?> attributes)
Writes the attributes to the specifiedCredentials
.
-
-
-
Method Detail
-
getInstance
public static CredentialsSupport getInstance()
-
getCredentialClasses
@NotNull public @NotNull java.util.Set<java.lang.Class> getCredentialClasses()
Description copied from interface:CredentialsSupport
Returns allcredentials
classes supported by this implementation.- Specified by:
getCredentialClasses
in interfaceCredentialsSupport
- Returns:
- the supported
credentials
classes.
-
getUserId
@Nullable public @Nullable java.lang.String getUserId(@NotNull @NotNull Credentials credentials)
Description copied from interface:CredentialsSupport
Retrieves the user identifier from the specifiedCredentials
. If the specified credentials are not supported or don't contain any user id information this method will returnnull
.- Specified by:
getUserId
in interfaceCredentialsSupport
- Parameters:
credentials
- The credentials as passed to the repository login.- Returns:
- The user id present in the given
Credentials
ornull
.
-
getAttributes
@NotNull public @NotNull java.util.Map<java.lang.String,?> getAttributes(@NotNull @NotNull Credentials credentials)
Description copied from interface:CredentialsSupport
Obtains the attributes as present with the specifiedCredentials
. If the specified credentials are not supported or don't contain any attributes this method will return an emptyMap
.- Specified by:
getAttributes
in interfaceCredentialsSupport
- Parameters:
credentials
- The credentials as passed to the repository login.- Returns:
- The credential attributes or an empty
Map
.
-
setAttributes
public boolean setAttributes(@NotNull @NotNull Credentials credentials, @NotNull @NotNull java.util.Map<java.lang.String,?> attributes)
Description copied from interface:CredentialsSupport
Writes the attributes to the specifiedCredentials
. If the specified credentials are not supported or doesn't allow to write attributes this method will returnfalse
.- Specified by:
setAttributes
in interfaceCredentialsSupport
- Parameters:
credentials
- The credentials as passed to the repository login.attributes
- The attributes to be written to the given credentials.- Returns:
true
, if the attributes were set;false
otherwise.
-
-