public final class CompositeCredentialsSupport extends Object implements CredentialsSupport
CredentialsSupport
interface that handles multiple providers.| Modifier and Type | Method and Description |
|---|---|
Map<String,?> |
getAttributes(Credentials credentials)
Obtains the attributes as present with the specified
Credentials. |
Set<Class> |
getCredentialClasses()
Returns all
credentials classes supported by this
implementation. |
String |
getUserId(Credentials credentials)
Retrieves the user identifier from the specified
Credentials. |
static CredentialsSupport |
newInstance(Supplier<Collection<CredentialsSupport>> credentialSupplier) |
boolean |
setAttributes(Credentials credentials,
Map<String,?> attributes)
Writes the attributes to the specified
Credentials. |
public static CredentialsSupport newInstance(@Nonnull Supplier<Collection<CredentialsSupport>> credentialSupplier)
@Nonnull public Set<Class> getCredentialClasses()
CredentialsSupportcredentials classes supported by this
implementation.getCredentialClasses in interface CredentialsSupportcredentials classes.@CheckForNull public String getUserId(@Nonnull 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.@Nonnull public Map<String,?> getAttributes(@Nonnull 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(@Nonnull Credentials credentials, @Nonnull Map<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 © 2012–2018 The Apache Software Foundation. All rights reserved.