Provides a default ChainedTokenCredential configuration that works for most applications that use Azure SDK client libraries. For more information, see DefaultAzureCredential overview.
The following credential types will be tried, in order:
Consult the documentation of these credential types for more information on how they attempt authentication.
Selecting credentials
Set environment variable AZURE_TOKEN_CREDENTIALS to select a subset of the credential chain. DefaultAzureCredential will try only the specified credential(s), but its other behavior remains the same. Valid values for AZURE_TOKEN_CREDENTIALS are the name of any single type in the above chain, for example "EnvironmentCredential" or "AzureCliCredential", and these special values:
Creates an instance of the DefaultAzureCredential class with DefaultAzureCredentialClientIdOptions.
new DefaultAzureCredential(options?: DefaultAzureCredentialClientIdOptions)
Parameters DefaultAzureCredential(DefaultAzureCredentialOptions)
Creates an instance of the DefaultAzureCredential class with DefaultAzureCredentialOptions.
new DefaultAzureCredential(options?: DefaultAzureCredentialOptions)
Parameters DefaultAzureCredential(DefaultAzureCredentialResourceIdOptions) Inherited Method Details getToken(string | string[], GetTokenOptions)
Returns the first access token returned by one of the chained TokenCredential
implementations. Throws an AggregateAuthenticationError when one or more credentials throws an AuthenticationError and no credentials have returned an access token.
This method is called automatically by Azure SDK client libraries. You may call this method directly, but you must also handle token caching and token refreshing.
function getToken(scopes: string | string[], options?: GetTokenOptions): Promise<AccessToken>
Parameters
string | string[]
The list of scopes for which the token will have access.
The options used to configure any requests this TokenCredential
implementation might make.
Promise<AccessToken>
Inherited From ChainedTokenCredential.getToken
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4