Package com.google.auth.oauth2
Class StsTokenExchangeResponse
java.lang.Object
com.google.auth.oauth2.StsTokenExchangeResponse
Represents 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.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionReturns the access boundary session key if present.newBuilder(String accessToken, String issuedTokenType, String tokenType) Returns a newStsTokenExchangeResponse.Builderinstance.
-
Method Details
-
newBuilder
public static StsTokenExchangeResponse.Builder newBuilder(String accessToken, String issuedTokenType, String tokenType) Returns a newStsTokenExchangeResponse.Builderinstance.- Parameters:
accessToken- The exchanged access token.issuedTokenType- The issued token type. For example,OAuth2Utils.TOKEN_TYPE_ACCESS_TOKEN.tokenType- The token type (e.g., "Bearer").- Returns:
- A new builder for creating
StsTokenExchangeResponseinstances.
-
getAccessToken
-
getIssuedTokenType
-
getTokenType
-
getExpiresInSeconds
-
getRefreshToken
-
getScopes
-
getAccessBoundarySessionKey
Returns the access boundary session key if present.- Returns:
- the access boundary session key or
nullif not present
-