AuthenticationServiceCollectionExtensions.AddAuthentication Metodo

Definizione

Overload

Nome Descrizione
AddAuthentication(IServiceCollection)

Registra i servizi richiesti dai servizi di autenticazione.

AddAuthentication(IServiceCollection, Action<AuthenticationOptions>)

Registra i servizi richiesti dai servizi di autenticazione e configura AuthenticationOptions.

AddAuthentication(IServiceCollection, Action<SharedAuthenticationOptions>)
AddAuthentication(IServiceCollection, String)

Registra i servizi richiesti dai servizi di autenticazione. defaultScheme specifica il nome dello schema da usare per impostazione predefinita quando non viene richiesto uno schema specifico.

AddAuthentication(IServiceCollection)

Origine:
AuthenticationServiceCollectionExtensions.cs
Origine:
AuthenticationServiceCollectionExtensions.cs
Origine:
AuthenticationServiceCollectionExtensions.cs

Registra i servizi richiesti dai servizi di autenticazione.

public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddAuthentication(this Microsoft.Extensions.DependencyInjection.IServiceCollection services);
public static Microsoft.AspNetCore.Authentication.AuthenticationBuilder AddAuthentication(this Microsoft.Extensions.DependencyInjection.IServiceCollection services);
static member AddAuthentication : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.Extensions.DependencyInjection.IServiceCollection
static member AddAuthentication : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.AspNetCore.Authentication.AuthenticationBuilder
<Extension()>
Public Function AddAuthentication (services As IServiceCollection) As IServiceCollection
<Extension()>
Public Function AddAuthentication (services As IServiceCollection) As AuthenticationBuilder

Parametri

Valori restituiti

Un AuthenticationBuilder che può essere usato per configurare ulteriormente l'autenticazione.

Si applica a

AddAuthentication(IServiceCollection, Action<AuthenticationOptions>)

Origine:
AuthenticationServiceCollectionExtensions.cs
Origine:
AuthenticationServiceCollectionExtensions.cs
Origine:
AuthenticationServiceCollectionExtensions.cs

Registra i servizi richiesti dai servizi di autenticazione e configura AuthenticationOptions.

public static Microsoft.AspNetCore.Authentication.AuthenticationBuilder AddAuthentication(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Microsoft.AspNetCore.Authentication.AuthenticationOptions> configureOptions);
static member AddAuthentication : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<Microsoft.AspNetCore.Authentication.AuthenticationOptions> -> Microsoft.AspNetCore.Authentication.AuthenticationBuilder
<Extension()>
Public Function AddAuthentication (services As IServiceCollection, configureOptions As Action(Of AuthenticationOptions)) As AuthenticationBuilder

Parametri

configureOptions
Action<AuthenticationOptions>

Delegato per configurare AuthenticationOptions.

Valori restituiti

Un AuthenticationBuilder che può essere usato per configurare ulteriormente l'autenticazione.

Si applica a

AddAuthentication(IServiceCollection, Action<SharedAuthenticationOptions>)

public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddAuthentication(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Microsoft.AspNetCore.Authentication.SharedAuthenticationOptions> configureOptions);
static member AddAuthentication : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<Microsoft.AspNetCore.Authentication.SharedAuthenticationOptions> -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddAuthentication (services As IServiceCollection, configureOptions As Action(Of SharedAuthenticationOptions)) As IServiceCollection

Parametri

Valori restituiti

Si applica a

AddAuthentication(IServiceCollection, String)

Origine:
AuthenticationServiceCollectionExtensions.cs
Origine:
AuthenticationServiceCollectionExtensions.cs
Origine:
AuthenticationServiceCollectionExtensions.cs

Registra i servizi richiesti dai servizi di autenticazione. defaultScheme specifica il nome dello schema da usare per impostazione predefinita quando non viene richiesto uno schema specifico.

public static Microsoft.AspNetCore.Authentication.AuthenticationBuilder AddAuthentication(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string defaultScheme);
static member AddAuthentication : Microsoft.Extensions.DependencyInjection.IServiceCollection * string -> Microsoft.AspNetCore.Authentication.AuthenticationBuilder
<Extension()>
Public Function AddAuthentication (services As IServiceCollection, defaultScheme As String) As AuthenticationBuilder

Parametri

defaultScheme
String

Schema predefinito utilizzato come fallback per tutti gli altri schemi.

Valori restituiti

Un AuthenticationBuilder che può essere usato per configurare ulteriormente l'autenticazione.

Si applica a