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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanObtains 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.longThe time the token key was initially created is available from this method.inthashCode()toString()
-
Constructor Details
-
DefaultToken
-
-
Method Details
-
getKey
Description copied from interface:TokenObtains the randomised, secure key assigned to this token. Presentation of this token toTokenServicewill always return aTokenthat is equal to the originalTokenissued for that key. -
getKeyCreationTime
public long getKeyCreationTime()Description copied from interface:TokenThe 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 theTokenServiceto replace the original token.- Specified by:
getKeyCreationTimein interfaceToken- Returns:
- the time this token key was created, in the same format as specified by
Date.getTime().
-
getExtendedInformation
Description copied from interface:TokenObtains the extended information associated within the token, which was presented when the token was first created.- Specified by:
getExtendedInformationin interfaceToken- Returns:
- the user-specified extended information, if any
-
equals
-
hashCode
public int hashCode() -
toString
-