public interface TokenInfo
TokenInfo
provides data associated with a login token and
basic methods to verify the validity of token credentials at given
point in time.Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,java.lang.String> |
getPrivateAttributes()
Returns the private attributes stored with this info object.
|
java.util.Map<java.lang.String,java.lang.String> |
getPublicAttributes()
Returns the public attributes stored with this info object.
|
java.lang.String |
getToken()
Returns the login token.
|
java.lang.String |
getUserId()
Returns the ID of the user associated with this token info object.
|
boolean |
isExpired(long loginTime)
Returns
true if the token has already expired; false otherwise. |
boolean |
matches(TokenCredentials tokenCredentials)
Returns
true if the specified credentials can be successfully
validated against the information stored in this instance. |
boolean |
remove()
Tries to remove the login token and all related information.
|
boolean |
resetExpiration(long loginTime)
Resets the expiration time of the login token associated with the given
TokenInfo . |
java.lang.String getUserId()
java.lang.String getToken()
boolean isExpired(long loginTime)
true
if the token has already expired; false
otherwise.loginTime
- The login time used to calculate the expiration status.true
if the token has already expired; false
otherwise.boolean resetExpiration(long loginTime)
TokenInfo
. Whether and when the expiration time of a given login
token is being reset is an implementation detail. Implementations that
don't allow for resetting the token's expiration time at all will always
return false
.loginTime
- The current login time.true
if the expiration time has been reset, false otherwise.boolean remove()
true
if the removal was successful.true
if the removal was successful, false
otherwise.boolean matches(TokenCredentials tokenCredentials)
true
if the specified credentials can be successfully
validated against the information stored in this instance.tokenCredentials
- The credentials to validate.true
if the specified credentials can be successfully
validated against the information stored in this instance; false
otherwise.java.util.Map<java.lang.String,java.lang.String> getPrivateAttributes()
java.util.Map<java.lang.String,java.lang.String> getPublicAttributes()
"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"