AuthenticationServiceCollectionExtensions.AddAuthentication Metoda

Definice

Přetížení

AddAuthentication(IServiceCollection)

Zaregistruje služby vyžadované ověřovacími službami.

AddAuthentication(IServiceCollection, Action<AuthenticationOptions>)

Zaregistruje služby vyžadované ověřovacími službami a nakonfiguruje AuthenticationOptions.

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

Zaregistruje služby vyžadované ověřovacími službami. defaultScheme Určuje název schématu, které se má ve výchozím nastavení použít, když není požadováno konkrétní schéma.

AddAuthentication(IServiceCollection)

Zaregistruje služby vyžadované ověřovacími službami.

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

Návraty

A AuthenticationBuilder , který lze použít k další konfiguraci ověřování.

Platí pro

AddAuthentication(IServiceCollection, Action<AuthenticationOptions>)

Zaregistruje služby vyžadované ověřovacími službami a nakonfiguruje 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>

Delegát pro konfiguraci AuthenticationOptions.

Návraty

A AuthenticationBuilder , který lze použít k další konfiguraci ověřování.

Platí pro

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

Návraty

Platí pro

AddAuthentication(IServiceCollection, String)

Zaregistruje služby vyžadované ověřovacími službami. defaultScheme Určuje název schématu, které se má ve výchozím nastavení použít, když není požadováno konkrétní schéma.

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

Výchozí schéma použité jako náhradní pro všechna ostatní schémata.

Návraty

A AuthenticationBuilder , který lze použít k další konfiguraci ověřování.

Platí pro