ApiKeyCredentials class

Authenticates to a service using an API key.

Constructors

ApiKeyCredentials(ApiKeyCredentialOptions)

Methods

signRequest(WebResourceLike)

Signs a request with the values provided in the inHeader and inQuery parameter.

Constructor Details

ApiKeyCredentials(ApiKeyCredentialOptions)

new ApiKeyCredentials(options: ApiKeyCredentialOptions)

Parameters

options
ApiKeyCredentialOptions

Specifies the options to be provided for auth. Either header or query needs to be provided.

Method Details

signRequest(WebResourceLike)

Signs a request with the values provided in the inHeader and inQuery parameter.

function signRequest(webResource: WebResourceLike): Promise<WebResourceLike>

Parameters

webResource
WebResourceLike

The WebResource to be signed.

Returns

Promise<WebResourceLike>

The signed request object.