Прочитать на английском

Поделиться через


AuthenticationServiceCollectionExtensions.AddAuthentication Метод

Определение

Перегрузки

AddAuthentication(IServiceCollection)

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

AddAuthentication(IServiceCollection, Action<AuthenticationOptions>)

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

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

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

AddAuthentication(IServiceCollection)

Исходный код:
AuthenticationServiceCollectionExtensions.cs
Исходный код:
AuthenticationServiceCollectionExtensions.cs
Исходный код:
AuthenticationServiceCollectionExtensions.cs

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

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);

Параметры

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

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

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

AddAuthentication(IServiceCollection, Action<AuthenticationOptions>)

Исходный код:
AuthenticationServiceCollectionExtensions.cs
Исходный код:
AuthenticationServiceCollectionExtensions.cs
Исходный код:
AuthenticationServiceCollectionExtensions.cs

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

public static Microsoft.AspNetCore.Authentication.AuthenticationBuilder AddAuthentication (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Microsoft.AspNetCore.Authentication.AuthenticationOptions> configureOptions);

Параметры

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);

Параметры

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

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

AddAuthentication(IServiceCollection, String)

Исходный код:
AuthenticationServiceCollectionExtensions.cs
Исходный код:
AuthenticationServiceCollectionExtensions.cs
Исходный код:
AuthenticationServiceCollectionExtensions.cs

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

public static Microsoft.AspNetCore.Authentication.AuthenticationBuilder AddAuthentication (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string defaultScheme);

Параметры

defaultScheme
String

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

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

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

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