Udostępnij za pośrednictwem


ITokenAcquirer Interface

Definition

Interface for the token acquisition service (for instance encapsulating MSAL.NET).

public interface ITokenAcquirer
type ITokenAcquirer = interface
Public Interface ITokenAcquirer

Methods

GetTokenForAppAsync(String, AcquireTokenOptions, CancellationToken)

Acquires an authentication result from the authority configured in the app, for the confidential client itself (not on behalf of a user) using the client credentials flow. See https://aka.ms/msal-net-client-credentials.

GetTokenForUserAsync(IEnumerable<String>, AcquireTokenOptions, ClaimsPrincipal, CancellationToken)

Typically used from an ASP.NET Core web app or web API controller. This method gets an access token for a downstream API on behalf of the user account for which the claims are provided in the current user.

Applies to