AuthenticationServiceCollectionExtensions.AddAuthentication Metoda

Definicja

Przeciążenia

AddAuthentication(IServiceCollection)

Rejestruje usługi wymagane przez usługi uwierzytelniania.

AddAuthentication(IServiceCollection, Action<AuthenticationOptions>)

Rejestruje usługi wymagane przez usługi uwierzytelniania i konfiguruje usługę AuthenticationOptions.

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

Rejestruje usługi wymagane przez usługi uwierzytelniania. defaultScheme określa nazwę schematu, który ma być używany domyślnie, gdy określony schemat nie jest żądany.

AddAuthentication(IServiceCollection)

Źródło:
AuthenticationServiceCollectionExtensions.cs
Źródło:
AuthenticationServiceCollectionExtensions.cs

Rejestruje usługi wymagane przez usługi uwierzytelniania.

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

Parametry

Zwraca

Element AuthenticationBuilder , który może służyć do dalszego konfigurowania uwierzytelniania.

Dotyczy

AddAuthentication(IServiceCollection, Action<AuthenticationOptions>)

Źródło:
AuthenticationServiceCollectionExtensions.cs
Źródło:
AuthenticationServiceCollectionExtensions.cs

Rejestruje usługi wymagane przez usługi uwierzytelniania i konfiguruje usługę 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

Parametry

configureOptions
Action<AuthenticationOptions>

Pełnomocnik do skonfigurowania AuthenticationOptions.

Zwraca

Element AuthenticationBuilder , który może służyć do dalszego konfigurowania uwierzytelniania.

Dotyczy

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

Parametry

Zwraca

Dotyczy

AddAuthentication(IServiceCollection, String)

Źródło:
AuthenticationServiceCollectionExtensions.cs
Źródło:
AuthenticationServiceCollectionExtensions.cs

Rejestruje usługi wymagane przez usługi uwierzytelniania. defaultScheme określa nazwę schematu, który ma być używany domyślnie, gdy określony schemat nie jest żądany.

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

Parametry

defaultScheme
String

Schemat domyślny używany jako rezerwowy dla wszystkich innych schematów.

Zwraca

Element AuthenticationBuilder , który może służyć do dalszego konfigurowania uwierzytelniania.

Dotyczy