다음을 통해 공유


DefaultCredentialsLoader Class

Definition

Default credentials loader.

public class DefaultCredentialsLoader : Microsoft.Identity.Abstractions.ICredentialsLoader
type DefaultCredentialsLoader = class
    interface ICredentialsLoader
Public Class DefaultCredentialsLoader
Implements ICredentialsLoader
Inheritance
DefaultCredentialsLoader
Derived
Implements

Constructors

DefaultCredentialsLoader()

Default constructor (for backward compatibility)

DefaultCredentialsLoader(ILogger<DefaultCredentialsLoader>)

Constructor with a logger

Properties

CredentialSourceLoaders

Dictionary of credential loaders per credential source. The application can add more to process additional credential sources(like dSMS).

Methods

LoadCredentialsIfNeededAsync(CredentialDescription, CredentialSourceLoaderParameters)

Load a given credential description, if needed. This method will leverage the CredentialSourceLoaders to load the credentials from the description.

LoadFirstValidCredentialsAsync(IEnumerable<CredentialDescription>, CredentialSourceLoaderParameters)

Load the first valid credential from the credentials description list. This is useful when you have multiple deployments (for instance on your developer machine, you can use a certificate from KeyVault, and when deployed in AKS, you use workload identity federation for AKS. You can express the list of credentials in the appsettings.json file, and this method will load the most appropriate based on the order.

ResetCredentials(IEnumerable<CredentialDescription>)

Resets resettable credentials in the credential description list (for instance reset the certificates so that they can be re-loaded again) Use, for example, before a retry.

Applies to