Compartir a través de


AuthenticationServiceCollectionExtensions.AddAuthentication Método

Definición

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. defaultScheme especifica el nombre del esquema que se va a usar de forma predeterminada cuando no se solicita un esquema específico.

AddAuthentication(IServiceCollection)

Source:
AuthenticationServiceCollectionExtensions.cs
Source:
AuthenticationServiceCollectionExtensions.cs
Source:
AuthenticationServiceCollectionExtensions.cs

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

Devoluciones

AuthenticationBuilder que se puede usar para configurar aún más la autenticación.

Se aplica a

AddAuthentication(IServiceCollection, Action<AuthenticationOptions>)

Source:
AuthenticationServiceCollectionExtensions.cs
Source:
AuthenticationServiceCollectionExtensions.cs
Source:
AuthenticationServiceCollectionExtensions.cs

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

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

Devoluciones

Se aplica a

AddAuthentication(IServiceCollection, String)

Source:
AuthenticationServiceCollectionExtensions.cs
Source:
AuthenticationServiceCollectionExtensions.cs
Source:
AuthenticationServiceCollectionExtensions.cs

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

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.

Se aplica a