AuthenticationServiceCollectionExtensions.AddAuthentication Método
Definición
Importante
Parte de la información hace referencia a la versión preliminar del producto, que puede haberse modificado sustancialmente antes de lanzar la versión definitiva. Microsoft no otorga ninguna garantía, explícita o implícita, con respecto a la información proporcionada aquí.
Sobrecargas
AddAuthentication(IServiceCollection) |
Registra los servicios requeridos por los servicios de autenticación. |
AddAuthentication(IServiceCollection, Action<AuthenticationOptions>) |
Registra los servicios requeridos AuthenticationOptionspor los servicios de autenticación y configura . |
AddAuthentication(IServiceCollection, Action<SharedAuthenticationOptions>) | |
AddAuthentication(IServiceCollection, String) |
Registra los servicios requeridos por los servicios de autenticación.
|
AddAuthentication(IServiceCollection)
Registra los servicios requeridos por los servicios de autenticación.
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
Devoluciones
AuthenticationBuilder que se puede usar para configurar aún más la autenticación.
Se aplica a
AddAuthentication(IServiceCollection, Action<AuthenticationOptions>)
Registra los servicios requeridos AuthenticationOptionspor los servicios de autenticación y configura .
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>
Delegado para configurar AuthenticationOptions.
Devoluciones
AuthenticationBuilder que se puede usar para configurar aún más la autenticación.
Se aplica 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>
Devoluciones
Se aplica a
AddAuthentication(IServiceCollection, String)
Registra los servicios requeridos por los servicios de autenticación.
defaultScheme
especifica el nombre del esquema que se va a usar de forma predeterminada cuando no se solicita un esquema específico.
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
Esquema predeterminado que se usa como reserva para todos los demás esquemas.
Devoluciones
AuthenticationBuilder que se puede usar para configurar aún más la autenticación.