ManagedIdentityAuthenticator class

Abstraction to acquire tokens from a Managed Service Identity.

Constructors

ManagedIdentityAuthenticator(string, string, IJwtTokenProviderFactory)

Initializes a new instance of the ManagedIdentityAuthenticator class.

Methods

getToken()

Acquires the security token.

Constructor Details

ManagedIdentityAuthenticator(string, string, IJwtTokenProviderFactory)

Initializes a new instance of the ManagedIdentityAuthenticator class.

new ManagedIdentityAuthenticator(appId: string, resource: string, tokenProviderFactory: IJwtTokenProviderFactory)

Parameters

appId

string

Client id for the managed identity to be used for acquiring tokens.

resource

string

Resource for which to acquire the token.

tokenProviderFactory
IJwtTokenProviderFactory

The JWT token provider factory to use.

Method Details

getToken()

Acquires the security token.

function getToken(): Promise<AccessToken>

Returns

Promise<AccessToken>

A promise with the AccessToken provided by the IJwtTokenProviderFactory class.