Constructor
new OAuthClientAuthHandler(options)
Instantiates an OAuth client authentication handler.
Parameters:
Name | Type | Description |
---|---|---|
options |
The OAuth Client Auth Handler instance options. Passing an |
Members
RETRY_CONFIG
Retry config for Auth-related requests.
Methods
applyClientAuthenticationOptions(opts, bearerToken)
Applies client authentication on the OAuth request's headers or POST body but does not process the request.
Parameters:
Name | Type | Description |
---|---|---|
opts |
The GaxiosOptions whose headers or data are to be modified depending on the client authentication mechanism to be used. |
|
bearerToken |
The optional bearer token to use for authentication. When this is used, no client authentication credentials are needed. |
injectAuthenticatedHeaders(opts, bearerToken)
Applies client authentication on the request's header if either basic authentication or bearer token authentication is selected.
Parameters:
Name | Type | Description |
---|---|---|
opts |
The GaxiosOptions whose headers or data are to be modified depending on the client authentication mechanism to be used. |
|
bearerToken |
The optional bearer token to use for authentication. When this is used, no client authentication credentials are needed. |
injectAuthenticatedRequestBody(opts)
Applies client authentication on the request's body if request-body client authentication is selected.
Parameters:
Name | Type | Description |
---|---|---|
opts |
The GaxiosOptions whose headers or data are to be modified depending on the client authentication mechanism to be used. |