Share via


WebApiBuilders.EnableTokenAcquisition Method

Definition

Allows a higher level abstraction of security token (i.e. System.IdentityModel.Tokens.Jwt and more modern, Microsoft.IdentityModel.JsonWebTokens) to be used with Microsoft Identity Web. Developers should continue to use EnableTokenAcquisitionToCallDownstreamApi. This API is not considered part of the public API and may change.

public static Microsoft.Identity.Web.MicrosoftIdentityAppCallsWebApiAuthenticationBuilder EnableTokenAcquisition (Action<Microsoft.Identity.Client.ConfidentialClientApplicationOptions> configureConfidentialClientApplicationOptions, string authenticationScheme, Microsoft.Extensions.DependencyInjection.IServiceCollection services, Microsoft.Extensions.Configuration.IConfigurationSection? configuration);
static member EnableTokenAcquisition : Action<Microsoft.Identity.Client.ConfidentialClientApplicationOptions> * string * Microsoft.Extensions.DependencyInjection.IServiceCollection * Microsoft.Extensions.Configuration.IConfigurationSection -> Microsoft.Identity.Web.MicrosoftIdentityAppCallsWebApiAuthenticationBuilder
Public Shared Function EnableTokenAcquisition (configureConfidentialClientApplicationOptions As Action(Of ConfidentialClientApplicationOptions), authenticationScheme As String, services As IServiceCollection, configuration As IConfigurationSection) As MicrosoftIdentityAppCallsWebApiAuthenticationBuilder

Parameters

configureConfidentialClientApplicationOptions
Action<ConfidentialClientApplicationOptions>

The action to configure ConfidentialClientApplicationOptions.

authenticationScheme
String

Authentication scheme.

services
IServiceCollection

The services being configured.

configuration
IConfigurationSection

IConfigurationSection.

Returns

The authentication builder to chain.

Applies to