Class DefaultToken
- java.lang.Object
-
- org.springframework.security.core.token.DefaultToken
-
-
Constructor Summary
Constructors Constructor Description DefaultToken(java.lang.String key, long keyCreationTime, java.lang.String extendedInformation)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.lang.StringgetExtendedInformation()Obtains the extended information associated within the token, which was presented when the token was first created.java.lang.StringgetKey()Obtains the randomised, secure key assigned to this token.longgetKeyCreationTime()The time the token key was initially created is available from this method.inthashCode()java.lang.StringtoString()
-
-
-
Method Detail
-
getKey
public java.lang.String 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
public java.lang.String 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
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-