AuthenticationServiceCollectionExtensions.AddAuthentication AuthenticationServiceCollectionExtensions.AddAuthentication AuthenticationServiceCollectionExtensions.AddAuthentication Method

Definition

Overloads

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

Adds authentication services to the specified IServiceCollection.

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

Adds authentication services to the specified IServiceCollection.

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

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

Adds authentication services to the specified IServiceCollection.

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

Returns

The IServiceCollection so that additional calls can be chained.

AddAuthentication(IServiceCollection, Action<AuthenticationOptions>) AddAuthentication(IServiceCollection, Action<AuthenticationOptions>) AddAuthentication(IServiceCollection, Action<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

Parameters

configureOptions
Action<AuthenticationOptions>

Returns

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

Adds authentication services to the specified IServiceCollection.

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

configureOptions
Action<SharedAuthenticationOptions>

An action delegate to configure the provided SharedAuthenticationOptions.

Returns

The IServiceCollection so that additional calls can be chained.

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

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

defaultScheme
String String String

Returns

Applies to