AuthenticationServiceCollectionExtensions.AddAuthentication Methode

Definition

Überlädt

AddAuthentication(IServiceCollection)

Registriert Dienste, die für Authentifizierungsdienste erforderlich sind.

AddAuthentication(IServiceCollection, Action<AuthenticationOptions>)

Registriert dienste, die für Authentifizierungsdienste erforderlich sind, und konfiguriert AuthenticationOptions.

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

Registriert Dienste, die für Authentifizierungsdienste erforderlich sind. defaultScheme gibt den Namen des Schemas an, das standardmäßig verwendet werden soll, wenn kein bestimmtes Schema angefordert wird.

AddAuthentication(IServiceCollection)

Registriert Dienste, die für Authentifizierungsdienste erforderlich sind.

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

Parameter

Gibt zurück

Ein AuthenticationBuilder , der zum weiteren Konfigurieren der Authentifizierung verwendet werden kann.

Gilt für:

AddAuthentication(IServiceCollection, Action<AuthenticationOptions>)

Registriert dienste, die für Authentifizierungsdienste erforderlich sind, und konfiguriert 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

Parameter

configureOptions
Action<AuthenticationOptions>

Ein Delegat zum Konfigurieren AuthenticationOptionsvon .

Gibt zurück

Ein AuthenticationBuilder , der zum weiteren Konfigurieren der Authentifizierung verwendet werden kann.

Gilt für:

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

Parameter

Gibt zurück

Gilt für:

AddAuthentication(IServiceCollection, String)

Registriert Dienste, die für Authentifizierungsdienste erforderlich sind. defaultScheme gibt den Namen des Schemas an, das standardmäßig verwendet werden soll, wenn kein bestimmtes Schema angefordert wird.

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

Parameter

defaultScheme
String

Das Standardschema, das als Fallback für alle anderen Schemas verwendet wird.

Gibt zurück

Ein AuthenticationBuilder , der zum weiteren Konfigurieren der Authentifizierung verwendet werden kann.

Gilt für: