AuthenticationServiceCollectionExtensions.AddAuthentication Método

Definição

Sobrecargas

AddAuthentication(IServiceCollection)

Registra os serviços exigidos pelos serviços de autenticação.

AddAuthentication(IServiceCollection, Action<AuthenticationOptions>)

Registra os serviços exigidos pelos serviços de autenticação e configura AuthenticationOptions .

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

Registra os serviços exigidos pelos serviços de autenticação. defaultScheme Especifica o nome do esquema a ser usado por padrão quando um esquema específico não é solicitado.

AddAuthentication(IServiceCollection)

Registra os serviços exigidos pelos serviços de autenticação.

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

Parâmetros

Retornos

IServiceCollection
AuthenticationBuilder

Um AuthenticationBuilder que pode ser usado para configurar ainda mais a autenticação.

Aplica-se a

AddAuthentication(IServiceCollection, Action<AuthenticationOptions>)

Registra os serviços exigidos pelos serviços de autenticação 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

Parâmetros

configureOptions
Action<AuthenticationOptions>

Um delegado a ser configurado AuthenticationOptions .

Retornos

AuthenticationBuilder

Um AuthenticationBuilder que pode ser usado para configurar ainda mais a autenticação.

Aplica-se 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

Parâmetros

Retornos

IServiceCollection

Aplica-se a

AddAuthentication(IServiceCollection, String)

Registra os serviços exigidos pelos serviços de autenticação. defaultScheme Especifica o nome do esquema a ser usado por padrão quando um esquema específico não é solicitado.

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

Parâmetros

defaultScheme
String

O esquema padrão usado como um fallback para todos os outros esquemas.

Retornos

AuthenticationBuilder

Um AuthenticationBuilder que pode ser usado para configurar ainda mais a autenticação.

Aplica-se a