Constructor
new StsCredentials(options, clientAuthentication)
Initializes an STS credentials instance.
Parameters:
Name | Type | Description |
---|---|---|
options |
The STS credentials instance options. Passing an |
|
clientAuthentication |
@DEPRECATED. Provide a |
Methods
(async) exchangeToken(stsCredentialsOptions, additionalHeaders, options)
Exchanges the provided token for another type of token based on the rfc8693 spec.
Parameters:
Name | Type | Description |
---|---|---|
stsCredentialsOptions |
The token exchange options used to populate the token exchange request. |
|
additionalHeaders |
Optional additional headers to pass along the request. |
|
options |
encodeUriComponent(JSON.stringified(options)) |
Optional additional GCP-specific non-spec defined options
to send with the request.
Example: |
Returns:
Type | Description |
---|---|
A promise that resolves with the token exchange response containing the requested token and its expiration time. |