MicrosoftIdentityWebApiAuthenticationBuilderExtensions.AddMicrosoftIdentityWebApi Method

Definition

Overloads

AddMicrosoftIdentityWebApi(AuthenticationBuilder, IConfigurationSection, String, Boolean)

Protects the web API with Microsoft identity platform (formerly Azure AD v2.0). This method expects the configuration file will have a section, named "AzureAd" as default, with the necessary settings to initialize authentication options.

AddMicrosoftIdentityWebApi(AuthenticationBuilder, IConfiguration, String, String, Boolean)

Protects the web API with Microsoft identity platform (formerly Azure AD v2.0). This method expects the configuration file will have a section, named "AzureAd" as default, with the necessary settings to initialize authentication options.

AddMicrosoftIdentityWebApi(AuthenticationBuilder, Action<JwtBearerOptions>, Action<MicrosoftIdentityOptions>, String, Boolean)

Protects the web API with Microsoft identity platform (formerly Azure AD v2.0).

AddMicrosoftIdentityWebApi(AuthenticationBuilder, IConfigurationSection, String, Boolean)

Protects the web API with Microsoft identity platform (formerly Azure AD v2.0). This method expects the configuration file will have a section, named "AzureAd" as default, with the necessary settings to initialize authentication options.

public static Microsoft.Identity.Web.MicrosoftIdentityWebApiAuthenticationBuilderWithConfiguration AddMicrosoftIdentityWebApi (this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder, Microsoft.Extensions.Configuration.IConfigurationSection configurationSection, string jwtBearerScheme = "Bearer", bool subscribeToJwtBearerMiddlewareDiagnosticsEvents = false);
static member AddMicrosoftIdentityWebApi : Microsoft.AspNetCore.Authentication.AuthenticationBuilder * Microsoft.Extensions.Configuration.IConfigurationSection * string * bool -> Microsoft.Identity.Web.MicrosoftIdentityWebApiAuthenticationBuilderWithConfiguration
<Extension()>
Public Function AddMicrosoftIdentityWebApi (builder As AuthenticationBuilder, configurationSection As IConfigurationSection, Optional jwtBearerScheme As String = "Bearer", Optional subscribeToJwtBearerMiddlewareDiagnosticsEvents As Boolean = false) As MicrosoftIdentityWebApiAuthenticationBuilderWithConfiguration

Parameters

builder
AuthenticationBuilder

The AuthenticationBuilder to which to add this configuration.

configurationSection
IConfigurationSection

The configuration second from which to fill-in the options.

jwtBearerScheme
String

The JWT bearer scheme name to be used. By default it uses "Bearer".

subscribeToJwtBearerMiddlewareDiagnosticsEvents
Boolean

Set to true if you want to debug, or just understand the JWT bearer events.

Returns

MicrosoftIdentityWebApiAuthenticationBuilderWithConfiguration

The authentication builder to chain.

Applies to

AddMicrosoftIdentityWebApi(AuthenticationBuilder, IConfiguration, String, String, Boolean)

Protects the web API with Microsoft identity platform (formerly Azure AD v2.0). This method expects the configuration file will have a section, named "AzureAd" as default, with the necessary settings to initialize authentication options.

public static Microsoft.Identity.Web.MicrosoftIdentityWebApiAuthenticationBuilderWithConfiguration AddMicrosoftIdentityWebApi (this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder, Microsoft.Extensions.Configuration.IConfiguration configuration, string configSectionName = "AzureAd", string jwtBearerScheme = "Bearer", bool subscribeToJwtBearerMiddlewareDiagnosticsEvents = false);
static member AddMicrosoftIdentityWebApi : Microsoft.AspNetCore.Authentication.AuthenticationBuilder * Microsoft.Extensions.Configuration.IConfiguration * string * string * bool -> Microsoft.Identity.Web.MicrosoftIdentityWebApiAuthenticationBuilderWithConfiguration
<Extension()>
Public Function AddMicrosoftIdentityWebApi (builder As AuthenticationBuilder, configuration As IConfiguration, Optional configSectionName As String = "AzureAd", Optional jwtBearerScheme As String = "Bearer", Optional subscribeToJwtBearerMiddlewareDiagnosticsEvents As Boolean = false) As MicrosoftIdentityWebApiAuthenticationBuilderWithConfiguration

Parameters

builder
AuthenticationBuilder

The AuthenticationBuilder to which to add this configuration.

configuration
IConfiguration

The configuration instance.

configSectionName
String

The configuration section with the necessary settings to initialize authentication options.

jwtBearerScheme
String

The JWT bearer scheme name to be used. By default it uses "Bearer".

subscribeToJwtBearerMiddlewareDiagnosticsEvents
Boolean

Set to true if you want to debug, or just understand the JWT bearer events.

Returns

MicrosoftIdentityWebApiAuthenticationBuilderWithConfiguration

The authentication builder to chain.

Applies to

AddMicrosoftIdentityWebApi(AuthenticationBuilder, Action<JwtBearerOptions>, Action<MicrosoftIdentityOptions>, String, Boolean)

Protects the web API with Microsoft identity platform (formerly Azure AD v2.0).

public static Microsoft.Identity.Web.MicrosoftIdentityWebApiAuthenticationBuilder AddMicrosoftIdentityWebApi (this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder, Action<Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerOptions> configureJwtBearerOptions, Action<Microsoft.Identity.Web.MicrosoftIdentityOptions> configureMicrosoftIdentityOptions, string jwtBearerScheme = "Bearer", bool subscribeToJwtBearerMiddlewareDiagnosticsEvents = false);
static member AddMicrosoftIdentityWebApi : Microsoft.AspNetCore.Authentication.AuthenticationBuilder * Action<Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerOptions> * Action<Microsoft.Identity.Web.MicrosoftIdentityOptions> * string * bool -> Microsoft.Identity.Web.MicrosoftIdentityWebApiAuthenticationBuilder
<Extension()>
Public Function AddMicrosoftIdentityWebApi (builder As AuthenticationBuilder, configureJwtBearerOptions As Action(Of JwtBearerOptions), configureMicrosoftIdentityOptions As Action(Of MicrosoftIdentityOptions), Optional jwtBearerScheme As String = "Bearer", Optional subscribeToJwtBearerMiddlewareDiagnosticsEvents As Boolean = false) As MicrosoftIdentityWebApiAuthenticationBuilder

Parameters

builder
AuthenticationBuilder

The AuthenticationBuilder to which to add this configuration.

configureJwtBearerOptions
Action<JwtBearerOptions>

The action to configure JwtBearerOptions.

configureMicrosoftIdentityOptions
Action<MicrosoftIdentityOptions>

The action to configure the MicrosoftIdentityOptions.

jwtBearerScheme
String

The JWT bearer scheme name to be used. By default it uses "Bearer".

subscribeToJwtBearerMiddlewareDiagnosticsEvents
Boolean

Set to true if you want to debug, or just understand the JWT bearer events.

Returns

MicrosoftIdentityWebApiAuthenticationBuilder

The authentication builder to chain.

Applies to