public interface TokenProvider
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PARAM_TOKEN_EXPIRATION
Optional configuration parameter to set the token expiration time in ms.
|
static java.lang.String |
PARAM_TOKEN_LENGTH
Optional configuration parameter to define the length of the key.
|
static java.lang.String |
PARAM_TOKEN_REFRESH
Optional configuration parameter to define if a given token should be
refreshed or not.
|
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 final java.lang.String PARAM_TOKEN_EXPIRATION
static final java.lang.String PARAM_TOKEN_LENGTH
static final java.lang.String PARAM_TOKEN_REFRESH
boolean doCreateToken(Credentials credentials)
true
if the given credentials indicate that a new token
needs to be issued.credentials
- The current credentials.true
if a new login token needs to be created, false
otherwise.TokenInfo createToken(Credentials credentials)
TokenInfo
.credentials
- The current credentials.TokenInfo
associated with the new login token or
null
if no token has been created.TokenInfo createToken(java.lang.String userId, java.util.Map<java.lang.String,?> attributes)
userId
and the specified attributes.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.TokenInfo getTokenInfo(java.lang.String token)
TokenInfo
associated with the specified login token
or null
.token
- A valid login token.TokenInfo
associated with the specified login token
or null
."Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"