public final class StsTokenExchangeRequest extends Object
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.
| Modifier and Type | Class and Description |
|---|---|
static class |
StsTokenExchangeRequest.Builder |
| Modifier and Type | Method and Description |
|---|---|
com.google.auth.oauth2.ActingParty |
getActingParty() |
String |
getAudience() |
String |
getGrantType() |
String |
getInternalOptions() |
String |
getRequestedTokenType() |
String |
getResource() |
List<String> |
getScopes() |
String |
getSubjectToken() |
String |
getSubjectTokenType() |
boolean |
hasActingParty() |
boolean |
hasAudience() |
boolean |
hasRequestedTokenType() |
boolean |
hasResource() |
boolean |
hasScopes() |
static StsTokenExchangeRequest.Builder |
newBuilder(String subjectToken,
String subjectTokenType)
Returns a new
StsTokenExchangeRequest.Builder instance. |
public static StsTokenExchangeRequest.Builder newBuilder(String subjectToken, String subjectTokenType)
StsTokenExchangeRequest.Builder instance.subjectToken - The token being exchanged. This represents the credentials being used to
authorize the token exchange request.subjectTokenType - The type of the subjectToken. For example, OAuth2Utils.TOKEN_TYPE_ACCESS_TOKEN.StsTokenExchangeRequest instances.public String getGrantType()
public String getSubjectToken()
public String getSubjectTokenType()
@Nullable public com.google.auth.oauth2.ActingParty getActingParty()
public boolean hasResource()
public boolean hasAudience()
public boolean hasRequestedTokenType()
public boolean hasScopes()
public boolean hasActingParty()
Copyright © 2025 Google. All rights reserved.