AuthenticationServiceCollectionExtensions.AddAuthentication Metodo
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Overload
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.
|
AddAuthentication(IServiceCollection)
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
- services
- IServiceCollection
Oggetto IServiceCollection.
Restituisce
Un AuthenticationBuilder che può essere usato per configurare ulteriormente l'autenticazione.
Si applica a
AddAuthentication(IServiceCollection, Action<AuthenticationOptions>)
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
- services
- IServiceCollection
Oggetto IServiceCollection.
- configureOptions
- Action<AuthenticationOptions>
Delegato per configurare AuthenticationOptions.
Restituisce
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
- services
- IServiceCollection
- configureOptions
- Action<SharedAuthenticationOptions>
Restituisce
Si applica a
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.
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
- services
- IServiceCollection
Oggetto IServiceCollection.
- defaultScheme
- String
Schema predefinito utilizzato come fallback per tutti gli altri schemi.
Restituisce
Un AuthenticationBuilder che può essere usato per configurare ulteriormente l'autenticazione.