Partager via


MicrosoftIdentityWebAppAuthenticationBuilderExtensions.AddMicrosoftIdentityWebApp Method

Definition

Overloads

AddMicrosoftIdentityWebApp(AuthenticationBuilder, IConfigurationSection, String, String, Boolean, String)

Add authentication with Microsoft identity platform. This method expects the configuration file will have a section, named "AzureAd" as default, with the necessary settings to initialize authentication options.

AddMicrosoftIdentityWebApp(AuthenticationBuilder, IConfiguration, String, String, String, Boolean, String)

Add authentication to a web app with Microsoft identity platform. This method expects the configuration file will have a section, named "AzureAd" as default, with the necessary settings to initialize authentication options.

AddMicrosoftIdentityWebApp(AuthenticationBuilder, Action<MicrosoftIdentityOptions>, Action<CookieAuthenticationOptions>, String, String, Boolean, String)

Add authentication with Microsoft identity platform.

AddMicrosoftIdentityWebApp(AuthenticationBuilder, IConfigurationSection, String, String, Boolean, String)

Add authentication with Microsoft identity platform. 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.MicrosoftIdentityWebAppAuthenticationBuilderWithConfiguration AddMicrosoftIdentityWebApp (this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder, Microsoft.Extensions.Configuration.IConfigurationSection configurationSection, string openIdConnectScheme = "OpenIdConnect", string? cookieScheme = "Cookies", bool subscribeToOpenIdConnectMiddlewareDiagnosticsEvents = false, string? displayName = default);
static member AddMicrosoftIdentityWebApp : Microsoft.AspNetCore.Authentication.AuthenticationBuilder * Microsoft.Extensions.Configuration.IConfigurationSection * string * string * bool * string -> Microsoft.Identity.Web.MicrosoftIdentityWebAppAuthenticationBuilderWithConfiguration
<Extension()>
Public Function AddMicrosoftIdentityWebApp (builder As AuthenticationBuilder, configurationSection As IConfigurationSection, Optional openIdConnectScheme As String = "OpenIdConnect", Optional cookieScheme As String = "Cookies", Optional subscribeToOpenIdConnectMiddlewareDiagnosticsEvents As Boolean = false, Optional displayName As String = Nothing) As MicrosoftIdentityWebAppAuthenticationBuilderWithConfiguration

Parameters

builder
AuthenticationBuilder

The AuthenticationBuilder to which to add this configuration.

configurationSection
IConfigurationSection

The configuration section from which to get the options.

openIdConnectScheme
String

The OpenID Connect scheme name to be used. By default it uses "OpenIdConnect".

cookieScheme
String

The cookie-based scheme name to be used. By default it uses "Cookies".

subscribeToOpenIdConnectMiddlewareDiagnosticsEvents
Boolean

Set to true if you want to debug, or just understand the OpenID Connect events.

displayName
String

A display name for the authentication handler.

Returns

The authentication builder for chaining.

Applies to

AddMicrosoftIdentityWebApp(AuthenticationBuilder, IConfiguration, String, String, String, Boolean, String)

Add authentication to a web app with Microsoft identity platform. 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.MicrosoftIdentityWebAppAuthenticationBuilderWithConfiguration AddMicrosoftIdentityWebApp (this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder, Microsoft.Extensions.Configuration.IConfiguration configuration, string configSectionName = "AzureAd", string openIdConnectScheme = "OpenIdConnect", string? cookieScheme = "Cookies", bool subscribeToOpenIdConnectMiddlewareDiagnosticsEvents = false, string? displayName = default);
static member AddMicrosoftIdentityWebApp : Microsoft.AspNetCore.Authentication.AuthenticationBuilder * Microsoft.Extensions.Configuration.IConfiguration * string * string * string * bool * string -> Microsoft.Identity.Web.MicrosoftIdentityWebAppAuthenticationBuilderWithConfiguration
<Extension()>
Public Function AddMicrosoftIdentityWebApp (builder As AuthenticationBuilder, configuration As IConfiguration, Optional configSectionName As String = "AzureAd", Optional openIdConnectScheme As String = "OpenIdConnect", Optional cookieScheme As String = "Cookies", Optional subscribeToOpenIdConnectMiddlewareDiagnosticsEvents As Boolean = false, Optional displayName As String = Nothing) As MicrosoftIdentityWebAppAuthenticationBuilderWithConfiguration

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.

openIdConnectScheme
String

The OpenID Connect scheme name to be used. By default it uses "OpenIdConnect".

cookieScheme
String

The cookie-based scheme name to be used. By default it uses "Cookies".

subscribeToOpenIdConnectMiddlewareDiagnosticsEvents
Boolean

Set to true if you want to debug, or just understand the OpenID Connect events.

displayName
String

A display name for the authentication handler.

Returns

The MicrosoftIdentityWebAppAuthenticationBuilderWithConfiguration builder for chaining.

Applies to

AddMicrosoftIdentityWebApp(AuthenticationBuilder, Action<MicrosoftIdentityOptions>, Action<CookieAuthenticationOptions>, String, String, Boolean, String)

Add authentication with Microsoft identity platform.

public static Microsoft.Identity.Web.MicrosoftIdentityWebAppAuthenticationBuilder AddMicrosoftIdentityWebApp (this Microsoft.AspNetCore.Authentication.AuthenticationBuilder builder, Action<Microsoft.Identity.Web.MicrosoftIdentityOptions> configureMicrosoftIdentityOptions, Action<Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationOptions>? configureCookieAuthenticationOptions = default, string openIdConnectScheme = "OpenIdConnect", string? cookieScheme = "Cookies", bool subscribeToOpenIdConnectMiddlewareDiagnosticsEvents = false, string? displayName = default);
static member AddMicrosoftIdentityWebApp : Microsoft.AspNetCore.Authentication.AuthenticationBuilder * Action<Microsoft.Identity.Web.MicrosoftIdentityOptions> * Action<Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationOptions> * string * string * bool * string -> Microsoft.Identity.Web.MicrosoftIdentityWebAppAuthenticationBuilder
<Extension()>
Public Function AddMicrosoftIdentityWebApp (builder As AuthenticationBuilder, configureMicrosoftIdentityOptions As Action(Of MicrosoftIdentityOptions), Optional configureCookieAuthenticationOptions As Action(Of CookieAuthenticationOptions) = Nothing, Optional openIdConnectScheme As String = "OpenIdConnect", Optional cookieScheme As String = "Cookies", Optional subscribeToOpenIdConnectMiddlewareDiagnosticsEvents As Boolean = false, Optional displayName As String = Nothing) As MicrosoftIdentityWebAppAuthenticationBuilder

Parameters

builder
AuthenticationBuilder

The AuthenticationBuilder to which to add this configuration.

configureMicrosoftIdentityOptions
Action<MicrosoftIdentityOptions>

The action to configure MicrosoftIdentityOptions.

configureCookieAuthenticationOptions
Action<CookieAuthenticationOptions>

The action to configure CookieAuthenticationOptions.

openIdConnectScheme
String

The OpenID Connect scheme name to be used. By default it uses "OpenIdConnect".

cookieScheme
String

The cookie-based scheme name to be used. By default it uses "Cookies".

subscribeToOpenIdConnectMiddlewareDiagnosticsEvents
Boolean

Set to true if you want to debug, or just understand the OpenID Connect events.

displayName
String

A display name for the authentication handler.

Returns

The authentication builder for chaining.

Applies to