AuthenticationServiceCollectionExtensions.AddAuthentication Método
Definição
Importante
Algumas informações se referem a produtos de pré-lançamento que podem ser substancialmente modificados antes do lançamento. A Microsoft não oferece garantias, expressas ou implícitas, das informações aqui fornecidas.
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.
|
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
- services
- IServiceCollection
Retornos
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
- services
- IServiceCollection
- configureOptions
- Action<AuthenticationOptions>
Um delegado para configurar AuthenticationOptions.
Retornos
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
- services
- IServiceCollection
- configureOptions
- Action<SharedAuthenticationOptions>
Retornos
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
- services
- IServiceCollection
- defaultScheme
- String
O esquema padrão usado como um fallback para todos os outros esquemas.
Retornos
Um AuthenticationBuilder que pode ser usado para configurar ainda mais a autenticação.