public class AccessToken implements SerializableRepresents a temporary OAuth2 access token and its expiration information.
Implements
SerializableStatic Methods
newBuilder()
public static AccessToken.Builder newBuilder()| Returns | |
|---|---|
| Type | Description |
AccessToken.Builder |
|
Constructors
AccessToken(String tokenValue, Date expirationTime)
public AccessToken(String tokenValue, Date expirationTime)| Parameters | |
|---|---|
| Name | Description |
tokenValue |
StringString representation of the access token. |
expirationTime |
DateTime when access token will expire. |
Methods
equals(Object obj)
public boolean equals(Object obj)| Parameter | |
|---|---|
| Name | Description |
obj |
Object |
| Returns | |
|---|---|
| Type | Description |
boolean |
|
getExpirationTime()
public Date getExpirationTime()Time when access token will expire.
| Returns | |
|---|---|
| Type | Description |
Date |
The expiration time as a Date. |
getScopes()
public List<String> getScopes()Scopes from the access token response. Not all credentials provide scopes in response and as per https://datatracker.ietf.org/doc/html/rfc6749#section-5.1 it is optional in the response.
| Returns | |
|---|---|
| Type | Description |
List<String> |
List of scopes |
getTokenValue()
public String getTokenValue()String representation of the access token.
| Returns | |
|---|---|
| Type | Description |
String |
The raw access token string value. |
hashCode()
public int hashCode()| Returns | |
|---|---|
| Type | Description |
int |
|
toBuilder()
public AccessToken.Builder toBuilder()| Returns | |
|---|---|
| Type | Description |
AccessToken.Builder |
|
toString()
public String toString()Returns a string representation of this access token, including the raw token value.
Security Warning: The output of this method includes the raw, unmasked access token value. Do not log this output in production environments as it may expose sensitive credentials.
| Returns | |
|---|---|
| Type | Description |
String |
|