Class StsTokenExchangeResponse (1.33.1)
Stay organized with collections
Save and categorize content based on your preferences.
publicfinalclass 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.
Inherited Members
Static Methods
newBuilder(String accessToken, String issuedTokenType, String tokenType)
publicstaticStsTokenExchangeResponse.BuildernewBuilder(StringaccessToken,StringissuedTokenType,StringtokenType)Returns a new StsTokenExchangeResponse.Builder instance.
| Parameters | |
|---|---|
| Name | Description |
accessToken |
String The exchanged access token. |
issuedTokenType |
String The issued token type. For example, OAuth2Utils#TOKEN_TYPE_ACCESS_TOKEN. |
tokenType |
String The token type (e.g., "Bearer"). |
| Returns | |
|---|---|
| Type | Description |
StsTokenExchangeResponse.Builder |
A new builder for creating StsTokenExchangeResponse instances. |
Methods
getAccessBoundarySessionKey()
publicStringgetAccessBoundarySessionKey()Returns the access boundary session key if present.
| Returns | |
|---|---|
| Type | Description |
String |
the access boundary session key or |
getAccessToken()
publicAccessTokengetAccessToken()| Returns | |
|---|---|
| Type | Description |
AccessToken |
|
getExpiresInSeconds()
publicLonggetExpiresInSeconds()| Returns | |
|---|---|
| Type | Description |
Long |
|
getIssuedTokenType()
publicStringgetIssuedTokenType()| Returns | |
|---|---|
| Type | Description |
String |
|
getRefreshToken()
publicStringgetRefreshToken()| Returns | |
|---|---|
| Type | Description |
String |
|
getScopes()
publicList<String>getScopes()| Returns | |
|---|---|
| Type | Description |
List<String> |
|
getTokenType()
publicStringgetTokenType()| Returns | |
|---|---|
| Type | Description |
String |
|