AuthenticationServiceCollectionExtensions.AddAuthentication AuthenticationServiceCollectionExtensions.AddAuthentication AuthenticationServiceCollectionExtensions.AddAuthentication AuthenticationServiceCollectionExtensions.AddAuthentication Method

Definition

Overloads

AddAuthentication(IServiceCollection) AddAuthentication(IServiceCollection) AddAuthentication(IServiceCollection) AddAuthentication(IServiceCollection)

Adds authentication services to the specified Microsoft.Extensions.DependencyInjection.IServiceCollection.

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

Adds authentication services to the specified Microsoft.Extensions.DependencyInjection.IServiceCollection.

AddAuthentication(IServiceCollection, String) AddAuthentication(IServiceCollection, String) AddAuthentication(IServiceCollection, String) AddAuthentication(IServiceCollection, String)

AddAuthentication(IServiceCollection) AddAuthentication(IServiceCollection) AddAuthentication(IServiceCollection) AddAuthentication(IServiceCollection)

Adds authentication services to the specified Microsoft.Extensions.DependencyInjection.IServiceCollection.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddAuthentication(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddAuthentication (this Microsoft.Extensions.DependencyInjection.IServiceCollection services);
static member AddAuthentication : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddAuthentication (services As IServiceCollection) As IServiceCollection

Parameters

services
Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection

The Microsoft.Extensions.DependencyInjection.IServiceCollection to add services to.

Returns

Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection

The Microsoft.Extensions.DependencyInjection.IServiceCollection so that additional calls can be chained.

AddAuthentication(IServiceCollection, Action<AuthenticationOptions>) AddAuthentication(IServiceCollection, Action<AuthenticationOptions>) AddAuthentication(IServiceCollection, Action<AuthenticationOptions>) AddAuthentication(IServiceCollection, Action<AuthenticationOptions>)

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Authentication::AuthenticationBuilder ^ AddAuthentication(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Action<Microsoft::AspNetCore::Authentication::AuthenticationOptions ^> ^ configureOptions);
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

Parameters

services
Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection
configureOptions
Action<AuthenticationOptions>

Returns

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

Adds authentication services to the specified Microsoft.Extensions.DependencyInjection.IServiceCollection.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddAuthentication(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Action<Microsoft::AspNetCore::Authentication::SharedAuthenticationOptions ^> ^ configureOptions);
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

Parameters

services
Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection

The Microsoft.Extensions.DependencyInjection.IServiceCollection to add services to.

configureOptions
Action<SharedAuthenticationOptions>

An action delegate to configure the provided SharedAuthenticationOptions.

Returns

Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection

The Microsoft.Extensions.DependencyInjection.IServiceCollection so that additional calls can be chained.

AddAuthentication(IServiceCollection, String) AddAuthentication(IServiceCollection, String) AddAuthentication(IServiceCollection, String) AddAuthentication(IServiceCollection, String)

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Authentication::AuthenticationBuilder ^ AddAuthentication(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, System::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

Parameters

services
Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection
defaultScheme
String String String String

Returns

Applies to