AuthenticationServiceCollectionExtensions.AddAuthentication Метод

Определение

Перегрузки

AddAuthentication(IServiceCollection)

Регистрирует службы, необходимые для служб проверки подлинности.

AddAuthentication(IServiceCollection, Action<AuthenticationOptions>)

Регистрирует службы, необходимые для служб проверки подлинности, и настраивает AuthenticationOptions.

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

Регистрирует службы, необходимые для служб проверки подлинности. defaultScheme указывает имя схемы, используемой по умолчанию, если конкретная схема не запрашивается.

AddAuthentication(IServiceCollection)

Регистрирует службы, необходимые для служб проверки подлинности.

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

Параметры

Возвращаемое значение

Объект , AuthenticationBuilder который можно использовать для дальнейшей настройки проверки подлинности.

Применяется к

AddAuthentication(IServiceCollection, Action<AuthenticationOptions>)

Регистрирует службы, необходимые для служб проверки подлинности, и настраивает 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

Параметры

configureOptions
Action<AuthenticationOptions>

Делегат для настройки AuthenticationOptions.

Возвращаемое значение

Объект , AuthenticationBuilder который можно использовать для дальнейшей настройки проверки подлинности.

Применяется к

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

Параметры

Возвращаемое значение

Применяется к

AddAuthentication(IServiceCollection, String)

Регистрирует службы, необходимые для служб проверки подлинности. defaultScheme указывает имя схемы, используемой по умолчанию, если конкретная схема не запрашивается.

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

Параметры

defaultScheme
String

Схема по умолчанию, используемая в качестве резервной для всех остальных схем.

Возвращаемое значение

Объект , AuthenticationBuilder который можно использовать для дальнейшей настройки проверки подлинности.

Применяется к