Class AbstractOAuth2Token
java.lang.Object
org.springframework.security.oauth2.core.AbstractOAuth2Token
- All Implemented Interfaces:
Serializable,OAuth2Token
- Direct Known Subclasses:
Jwt,OAuth2AccessToken,OAuth2RefreshToken,OidcIdToken
Base class for OAuth 2.0 Token implementations.
- Since:
- 5.0
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractOAuth2Token(String tokenValue) Sub-class constructor.protectedAbstractOAuth2Token(String tokenValue, Instant issuedAt, Instant expiresAt) Sub-class constructor. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the expiration time on or after which the token MUST NOT be accepted.Returns the time at which the token was issued.Returns the token value.inthashCode()
-
Constructor Details
-
AbstractOAuth2Token
Sub-class constructor.- Parameters:
tokenValue- the token value
-
AbstractOAuth2Token
protected AbstractOAuth2Token(String tokenValue, @Nullable Instant issuedAt, @Nullable Instant expiresAt) Sub-class constructor.- Parameters:
tokenValue- the token valueissuedAt- the time at which the token was issued, may benullexpiresAt- the expiration time on or after which the token MUST NOT be accepted, may benull
-
-
Method Details
-
getTokenValue
Returns the token value.- Specified by:
getTokenValuein interfaceOAuth2Token- Returns:
- the token value
-
getIssuedAt
Returns the time at which the token was issued.- Specified by:
getIssuedAtin interfaceOAuth2Token- Returns:
- the time the token was issued or
null
-
getExpiresAt
Returns the expiration time on or after which the token MUST NOT be accepted.- Specified by:
getExpiresAtin interfaceOAuth2Token- Returns:
- the token expiration time or
null
-
equals
-
hashCode
public int hashCode()
-