public final class StsTokenExchangeResponseRepresents a successful OAuth 2.0 token exchange response from the Google Security Token Service (STS), as defined in RFC 8693, Section 2.2.1.
This class provides access to the exchanged access token, issued token type, token type, expiration time, refresh token (optional), scopes (optional), and the access boundary session key (optional).
Instances are immutable. Use #newBuilder(String, String, String) to create an instance.
Static Methods
newBuilder(String accessToken, String issuedTokenType, String tokenType)
public static StsTokenExchangeResponse.Builder newBuilder(String accessToken, String issuedTokenType, String tokenType)Returns a new StsTokenExchangeResponse.Builder instance.
| Parameters | |
|---|---|
| Name | Description |
accessToken |
StringThe exchanged access token. |
issuedTokenType |
StringThe issued token type. For example, OAuth2Utils#TOKEN_TYPE_ACCESS_TOKEN. |
tokenType |
StringThe token type (e.g., "Bearer"). |
| Returns | |
|---|---|
| Type | Description |
StsTokenExchangeResponse.Builder |
A new builder for creating StsTokenExchangeResponse instances. |
Methods
getAccessBoundarySessionKey()
public String getAccessBoundarySessionKey()Returns the access boundary session key if present.
| Returns | |
|---|---|
| Type | Description |
String |
the access boundary session key or |
getAccessToken()
public AccessToken getAccessToken()| Returns | |
|---|---|
| Type | Description |
AccessToken |
|
getExpiresInSeconds()
public Long getExpiresInSeconds()| Returns | |
|---|---|
| Type | Description |
Long |
|
getIssuedTokenType()
public String getIssuedTokenType()| Returns | |
|---|---|
| Type | Description |
String |
|
getRefreshToken()
public String getRefreshToken()| Returns | |
|---|---|
| Type | Description |
String |
|
getScopes()
public List<String> getScopes()| Returns | |
|---|---|
| Type | Description |
List<String> |
|
getTokenType()
public String getTokenType()| Returns | |
|---|---|
| Type | Description |
String |
|