public class Token extends Object
| Constructor and Description |
|---|
Token(String accessToken,
String tokenType,
Instant expiry)
Constructor for non-refreshable tokens (e.g.
|
Token(String accessToken,
String tokenType,
String refreshToken,
Instant expiry)
Constructor for refreshable tokens.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getAccessToken()
Returns the access token string.
|
String |
getCanonicalTokenType()
Returns the token type canonicalized for use as the Authorization header scheme.
|
Instant |
getExpiry()
Returns the expiry time of the token as a Instant.
|
String |
getRefreshToken()
Returns the refresh token, if available.
|
String |
getTokenType()
Returns the type of the token (e.g., "Bearer").
|
public Token(String accessToken, String tokenType, Instant expiry)
public String getTokenType()
public String getCanonicalTokenType()
token_type in any case (e.g.
"bearer", "BEARER"). Some downstream servers and proxies reject anything other than the
canonical "Bearer" capitalization, so we normalize that scheme here. Other schemes are returned
unchanged.public String getRefreshToken()
public String getAccessToken()
public Instant getExpiry()
Copyright © 2026. All rights reserved.