public final class CompositeTokenProvider extends java.lang.Object implements TokenProvider
TokenProvider
s into a single
provider.PARAM_TOKEN_EXPIRATION, PARAM_TOKEN_LENGTH, PARAM_TOKEN_REFRESH
Modifier and Type | Method and Description |
---|---|
TokenInfo |
createToken(Credentials credentials)
Issues a new login token for the user with the specified credentials
and returns the associated
TokenInfo . |
TokenInfo |
createToken(java.lang.String userId,
java.util.Map<java.lang.String,?> attributes)
Issues a new login token for the user with the given
userId
and the specified attributes. |
boolean |
doCreateToken(Credentials credentials)
Returns
true if the given credentials indicate that a new token
needs to be issued. |
TokenInfo |
getTokenInfo(java.lang.String token)
Retrieves the
TokenInfo associated with the specified login token
or null . |
static TokenProvider |
newInstance(java.util.List<? extends TokenProvider> providers) |
static TokenProvider |
newInstance(TokenProvider... providers) |
public static TokenProvider newInstance(TokenProvider... providers)
public static TokenProvider newInstance(java.util.List<? extends TokenProvider> providers)
public boolean doCreateToken(Credentials credentials)
TokenProvider
true
if the given credentials indicate that a new token
needs to be issued.doCreateToken
in interface TokenProvider
credentials
- The current credentials.true
if a new login token needs to be created, false
otherwise.public TokenInfo createToken(Credentials credentials)
TokenProvider
TokenInfo
.createToken
in interface TokenProvider
credentials
- The current credentials.TokenInfo
associated with the new login token or
null
if no token has been created.public TokenInfo createToken(java.lang.String userId, java.util.Map<java.lang.String,?> attributes)
TokenProvider
userId
and the specified attributes.createToken
in interface TokenProvider
userId
- The identifier of the user for which a new token should
be created.attributes
- The attributes associated with the new token.TokenInfo
associated with the new login token or
null
if no token has been created.public TokenInfo getTokenInfo(java.lang.String token)
TokenProvider
TokenInfo
associated with the specified login token
or null
.getTokenInfo
in interface TokenProvider
token
- A valid login token.TokenInfo
associated with the specified login token
or null
."Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"