public final class StsRequestHandler extends Object
This class handles the process of exchanging one type of token for another using the Security
Token Service (STS). It constructs and sends the token exchange request to the STS endpoint and
parses the response to create an StsTokenExchangeResponse object.
Use the newBuilder(String, StsTokenExchangeRequest, HttpRequestFactory) method to
create a new builder for constructing an instance of this class.
| Modifier and Type | Class and Description |
|---|---|
static class |
StsRequestHandler.Builder |
| Modifier and Type | Method and Description |
|---|---|
StsTokenExchangeResponse |
exchangeToken()
Exchanges the provided token for another type of token based on the RFC 8693 spec.
|
static StsRequestHandler.Builder |
newBuilder(String tokenExchangeEndpoint,
StsTokenExchangeRequest stsTokenExchangeRequest,
com.google.api.client.http.HttpRequestFactory httpRequestFactory)
Returns a new builder for creating an instance of
StsRequestHandler. |
public static StsRequestHandler.Builder newBuilder(String tokenExchangeEndpoint, StsTokenExchangeRequest stsTokenExchangeRequest, com.google.api.client.http.HttpRequestFactory httpRequestFactory)
StsRequestHandler.tokenExchangeEndpoint - The STS token exchange endpoint.stsTokenExchangeRequest - The STS token exchange request.httpRequestFactory - The HTTP request factory to use for sending the request.public StsTokenExchangeResponse exchangeToken() throws IOException
IOExceptionCopyright © 2025 Google. All rights reserved.