Package com.google.auth.oauth2
Class StsTokenExchangeRequest
java.lang.Object
com.google.auth.oauth2.StsTokenExchangeRequest
Represents an OAuth 2.0 token exchange request, as defined in RFC 8693, Section 2.1.
This class encapsulates the parameters necessary for making a token exchange request to Google Security Token Service (STS). It includes the subject token, subject token type, optional parameters like acting party, scopes, resource, audience, requested token type, and internal options.
Instances of this class are immutable. Use the newBuilder(String, String) method to
create a new builder.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptioncom.google.auth.oauth2.ActingPartybooleanbooleanbooleanbooleanbooleannewBuilder(String subjectToken, String subjectTokenType) Returns a newStsTokenExchangeRequest.Builderinstance.
-
Method Details
-
newBuilder
public static StsTokenExchangeRequest.Builder newBuilder(String subjectToken, String subjectTokenType) Returns a newStsTokenExchangeRequest.Builderinstance.- Parameters:
subjectToken- The token being exchanged. This represents the credentials being used to authorize the token exchange request.subjectTokenType- The type of thesubjectToken. For example,OAuth2Utils.TOKEN_TYPE_ACCESS_TOKEN.- Returns:
- A new builder for creating
StsTokenExchangeRequestinstances.
-
getGrantType
-
getSubjectToken
-
getSubjectTokenType
-
getResource
-
getAudience
-
getRequestedTokenType
-
getScopes
-
getActingParty
-
getInternalOptions
-
hasResource
public boolean hasResource() -
hasAudience
public boolean hasAudience() -
hasRequestedTokenType
public boolean hasRequestedTokenType() -
hasScopes
public boolean hasScopes() -
hasActingParty
public boolean hasActingParty()
-