AuthenticationServiceCollectionExtensions.AddAuthentication Méthode

Définition

Surcharges

AddAuthentication(IServiceCollection)

Inscrit les services requis par les services d’authentification.

AddAuthentication(IServiceCollection, Action<AuthenticationOptions>)

Inscrit les services requis par les services d’authentification et configure AuthenticationOptions.

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

Inscrit les services requis par les services d’authentification. defaultScheme spécifie le nom du schéma à utiliser par défaut lorsqu’un schéma spécifique n’est pas demandé.

AddAuthentication(IServiceCollection)

Inscrit les services requis par les services d’authentification.

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

Paramètres

services
IServiceCollection

L’IServiceCollectionopérateur

Retours

AuthenticationBuilder qui peut être utilisé pour configurer davantage l’authentification.

S’applique à

AddAuthentication(IServiceCollection, Action<AuthenticationOptions>)

Inscrit les services requis par les services d’authentification et configure 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

Paramètres

services
IServiceCollection

L’IServiceCollectionopérateur

configureOptions
Action<AuthenticationOptions>

Délégué à configurer AuthenticationOptions.

Retours

AuthenticationBuilder qui peut être utilisé pour configurer davantage l’authentification.

S’applique à

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

Paramètres

Retours

S’applique à

AddAuthentication(IServiceCollection, String)

Inscrit les services requis par les services d’authentification. defaultScheme spécifie le nom du schéma à utiliser par défaut lorsqu’un schéma spécifique n’est pas demandé.

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

Paramètres

services
IServiceCollection

L’IServiceCollectionopérateur

defaultScheme
String

Schéma par défaut utilisé comme secours pour tous les autres schémas.

Retours

AuthenticationBuilder qui peut être utilisé pour configurer davantage l’authentification.

S’applique à