Class DefaultToken
java.lang.Object
org.springframework.security.core.token.DefaultToken
- All Implemented Interfaces:
Token
The default implementation of
Token
.- Since:
- 2.0.1
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Obtains the extended information associated within the token, which was presented when the token was first created.getKey()
Obtains the randomised, secure key assigned to this token.long
The time the token key was initially created is available from this method.int
hashCode()
toString()
-
Constructor Details
-
DefaultToken
-
-
Method Details
-
getKey
Description copied from interface:Token
Obtains the randomised, secure key assigned to this token. Presentation of this token toTokenService
will always return aToken
that is equal to the originalToken
issued for that key. -
getKeyCreationTime
public long getKeyCreationTime()Description copied from interface:Token
The time the token key was initially created is available from this method. Note that a given token must never have this creation time changed. If necessary, a new token can be requested from theTokenService
to replace the original token.- Specified by:
getKeyCreationTime
in interfaceToken
- Returns:
- the time this token key was created, in the same format as specified by
Date.getTime()
.
-
getExtendedInformation
Description copied from interface:Token
Obtains the extended information associated within the token, which was presented when the token was first created.- Specified by:
getExtendedInformation
in interfaceToken
- Returns:
- the user-specified extended information, if any
-
equals
-
hashCode
public int hashCode() -
toString
-