public final class SimpleCredentialsSupport extends java.lang.Object implements CredentialsSupport
CredentialsSupport
interface that handles SimpleCredentials.| Modifier and Type | Method and Description |
|---|---|
@NotNull java.util.Map<java.lang.String,?> |
getAttributes(@NotNull Credentials credentials)
Obtains the attributes as present with the specified
Credentials. |
@NotNull com.google.common.collect.ImmutableSet<java.lang.Class> |
getCredentialClasses()
Returns all
credentials classes supported by this
implementation. |
static CredentialsSupport |
getInstance() |
@Nullable java.lang.String |
getUserId(@NotNull Credentials credentials)
Retrieves the user identifier from the specified
Credentials. |
boolean |
setAttributes(@NotNull Credentials credentials,
@NotNull java.util.Map<java.lang.String,?> attributes)
Writes the attributes to the specified
Credentials. |
public static CredentialsSupport getInstance()
@NotNull public @NotNull com.google.common.collect.ImmutableSet<java.lang.Class> getCredentialClasses()
CredentialsSupportcredentials classes supported by this
implementation.getCredentialClasses in interface CredentialsSupportcredentials classes.@Nullable
public @Nullable java.lang.String getUserId(@NotNull
@NotNull Credentials credentials)
CredentialsSupportCredentials.
If the specified credentials are not supported or don't contain any
user id information this method will return null.getUserId in interface CredentialsSupportcredentials - The credentials as passed to the repository login.Credentials or null.@NotNull
public @NotNull java.util.Map<java.lang.String,?> getAttributes(@NotNull
@NotNull Credentials credentials)
CredentialsSupportCredentials.
If the specified credentials are not supported or don't contain any
attributes this method will return an empty Map.getAttributes in interface CredentialsSupportcredentials - The credentials as passed to the repository login.Map.public boolean setAttributes(@NotNull
@NotNull Credentials credentials,
@NotNull
@NotNull java.util.Map<java.lang.String,?> attributes)
CredentialsSupportCredentials.
If the specified credentials are not supported or doesn't allow to write
attributes this method will return false.setAttributes in interface CredentialsSupportcredentials - The credentials as passed to the repository login.attributes - The attributes to be written to the given credentials.true, if the attributes were set; false otherwise.Copyright © 2010 - 2023 Adobe. All Rights Reserved