Partager via


AppBuilderExtension.AddMicrosoftIdentityWebApi Method

Definition

Adds a protected web API.

public static Owin.IAppBuilder AddMicrosoftIdentityWebApi (this Owin.IAppBuilder app, Microsoft.Identity.Web.OWIN.OwinTokenAcquirerFactory tokenAcquirerFactory, Action<Microsoft.Identity.Abstractions.MicrosoftIdentityApplicationOptions>? configureMicrosoftIdentityApplicationOptions = default, Action<Microsoft.Owin.Security.OAuth.OAuthBearerAuthenticationOptions>? updateOptions = default, string configurationSection = "AzureAd");
static member AddMicrosoftIdentityWebApi : Owin.IAppBuilder * Microsoft.Identity.Web.OWIN.OwinTokenAcquirerFactory * Action<Microsoft.Identity.Abstractions.MicrosoftIdentityApplicationOptions> * Action<Microsoft.Owin.Security.OAuth.OAuthBearerAuthenticationOptions> * string -> Owin.IAppBuilder
<Extension()>
Public Function AddMicrosoftIdentityWebApi (app As IAppBuilder, tokenAcquirerFactory As OwinTokenAcquirerFactory, Optional configureMicrosoftIdentityApplicationOptions As Action(Of MicrosoftIdentityApplicationOptions) = Nothing, Optional updateOptions As Action(Of OAuthBearerAuthenticationOptions) = Nothing, Optional configurationSection As String = "AzureAd") As IAppBuilder

Parameters

app
Owin.IAppBuilder

Application builder.

tokenAcquirerFactory
OwinTokenAcquirerFactory

Token acquirer factory.

configureMicrosoftIdentityApplicationOptions
Action<MicrosoftIdentityApplicationOptions>

Configure Microsoft authentication options.

updateOptions
Action<Microsoft.Owin.Security.OAuth.OAuthBearerAuthenticationOptions>

Update the OWIN options if you want to finesse the token validation.

configurationSection
String

Configuration section in which to read the options.

Returns

Owin.IAppBuilder

The app builder to chain.

Applies to