Sdílet prostřednictvím


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 konfiguruje 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á použít ve výchozím nastavení, pokud není požadováno konkrétní schéma.

AddAuthentication(IServiceCollection)

Zdroj:
AuthenticationServiceCollectionExtensions.cs
Zdroj:
AuthenticationServiceCollectionExtensions.cs
Zdroj:
AuthenticationServiceCollectionExtensions.cs

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

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

Platí pro

AddAuthentication(IServiceCollection, Action<AuthenticationOptions>)

Zdroj:
AuthenticationServiceCollectionExtensions.cs
Zdroj:
AuthenticationServiceCollectionExtensions.cs
Zdroj:
AuthenticationServiceCollectionExtensions.cs

Zaregistruje služby vyžadované ověřovacími službami a konfiguruje 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 ke konfiguraci AuthenticationOptions.

Návraty

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)

Zdroj:
AuthenticationServiceCollectionExtensions.cs
Zdroj:
AuthenticationServiceCollectionExtensions.cs
Zdroj:
AuthenticationServiceCollectionExtensions.cs

Zaregistruje služby vyžadované ověřovacími službami. defaultScheme určuje název schématu, který se má použít ve výchozím nastavení, pokud 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 záložní pro všechna ostatní schémata.

Návraty

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

Platí pro