AzureIdentityCredentialAdapter class

This class provides a simple extension to use <xref:TokenCredential> from @azure/identity library to use with legacy Azure SDKs that accept ServiceClientCredentials family of credentials for authentication.

Constructors

AzureIdentityCredentialAdapter(TokenCredential, string | string[])

Methods

getToken()
signRequest(WebResource)

Signs a request with the Authentication header.

Constructor Details

AzureIdentityCredentialAdapter(TokenCredential, string | string[])

new AzureIdentityCredentialAdapter(azureTokenCredential: TokenCredential, scopes?: string | string[])

Parameters

azureTokenCredential
TokenCredential
scopes

string | string[]

Method Details

getToken()

function getToken(): Promise<TokenResponse>

Returns

Promise<TokenResponse>

signRequest(WebResource)

Signs a request with the Authentication header.

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

Parameters

webResource
WebResource

The WebResourceLike/request to be signed.

Returns

Promise<WebResource>

The signed request object;