public final class CompositeCredentialsSupport extends java.lang.Object implements CredentialsSupport
CredentialsSupport
interface that handles multiple providers.Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,?> |
getAttributes(Credentials credentials)
Obtains the attributes as present with the specified
Credentials . |
java.util.Set<java.lang.Class> |
getCredentialClasses()
Returns all
credentials classes supported by this
implementation. |
java.lang.String |
getUserId(Credentials credentials)
Retrieves the user identifier from the specified
Credentials . |
static CredentialsSupport |
newInstance(java.util.function.Supplier<java.util.Collection<CredentialsSupport>> credentialSupplier) |
boolean |
setAttributes(Credentials credentials,
java.util.Map<java.lang.String,?> attributes)
Writes the attributes to the specified
Credentials . |
public static CredentialsSupport newInstance(java.util.function.Supplier<java.util.Collection<CredentialsSupport>> credentialSupplier)
public java.util.Set<java.lang.Class> getCredentialClasses()
CredentialsSupport
credentials
classes supported by this
implementation.getCredentialClasses
in interface CredentialsSupport
credentials
classes.public java.lang.String getUserId(Credentials credentials)
CredentialsSupport
Credentials
.
If the specified credentials are not supported or don't contain any
user id information this method will return null
.getUserId
in interface CredentialsSupport
credentials
- The credentials as passed to the repository login.Credentials
or null
.public java.util.Map<java.lang.String,?> getAttributes(Credentials credentials)
CredentialsSupport
Credentials
.
If the specified credentials are not supported or don't contain any
attributes this method will return an empty Map
.getAttributes
in interface CredentialsSupport
credentials
- The credentials as passed to the repository login.Map
.public boolean setAttributes(Credentials credentials, java.util.Map<java.lang.String,?> attributes)
CredentialsSupport
Credentials
.
If the specified credentials are not supported or doesn't allow to write
attributes this method will return false
.setAttributes
in interface CredentialsSupport
credentials
- 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 - 2020 Adobe Systems Incorporated. All Rights Reserved"