AuthenticationServiceCollectionExtensions.AddScheme AuthenticationServiceCollectionExtensions.AddScheme AuthenticationServiceCollectionExtensions.AddScheme AuthenticationServiceCollectionExtensions.AddScheme Method

Definition

Overloads

AddScheme<TOptions,THandler>(IServiceCollection, String, Action<TOptions>) AddScheme<TOptions,THandler>(IServiceCollection, String, Action<TOptions>) AddScheme<TOptions,THandler>(IServiceCollection, String, Action<TOptions>) AddScheme<TOptions,THandler>(IServiceCollection, String, Action<TOptions>)
AddScheme<TOptions,THandler>(IServiceCollection, String, String, Action<TOptions>) AddScheme<TOptions,THandler>(IServiceCollection, String, String, Action<TOptions>) AddScheme<TOptions,THandler>(IServiceCollection, String, String, Action<TOptions>) AddScheme<TOptions,THandler>(IServiceCollection, String, String, Action<TOptions>)
AddScheme<TOptions,THandler>(IServiceCollection, String, String, Action<AuthenticationSchemeBuilder>, Action<TOptions>) AddScheme<TOptions,THandler>(IServiceCollection, String, String, Action<AuthenticationSchemeBuilder>, Action<TOptions>) AddScheme<TOptions,THandler>(IServiceCollection, String, String, Action<AuthenticationSchemeBuilder>, Action<TOptions>) AddScheme<TOptions,THandler>(IServiceCollection, String, String, Action<AuthenticationSchemeBuilder>, Action<TOptions>)

AddScheme<TOptions,THandler>(IServiceCollection, String, Action<TOptions>) AddScheme<TOptions,THandler>(IServiceCollection, String, Action<TOptions>) AddScheme<TOptions,THandler>(IServiceCollection, String, Action<TOptions>) AddScheme<TOptions,THandler>(IServiceCollection, String, Action<TOptions>)

Warning

This API is now obsolete.

public:
generic <typename TOptions, typename THandler>
 where TOptions : Microsoft::AspNetCore::Authentication::AuthenticationSchemeOptionsgcnew() where THandler : Microsoft::AspNetCore::Authentication::AuthenticationHandler<TOptions>[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddScheme(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, System::String ^ authenticationScheme, Action<TOptions> ^ configureOptions);
[System.Obsolete("AddScheme is obsolete. Use AddAuthentication().AddScheme instead.")]
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddScheme<TOptions,THandler> (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string authenticationScheme, Action<TOptions> configureOptions) where TOptions : Microsoft.AspNetCore.Authentication.AuthenticationSchemeOptionsnew() where THandler : Microsoft.AspNetCore.Authentication.AuthenticationHandler<TOptions>;
static member AddScheme : Microsoft.Extensions.DependencyInjection.IServiceCollection * string * Action<'Options (requires 'Options :> Microsoft.AspNetCore.Authentication.AuthenticationSchemeOptions and 'Options : (new : unit -> 'Options))> -> Microsoft.Extensions.DependencyInjection.IServiceCollection (requires 'Options :> Microsoft.AspNetCore.Authentication.AuthenticationSchemeOptions and 'Options : (new : unit -> 'Options) and 'Handler :> Microsoft.AspNetCore.Authentication.AuthenticationHandler<'Options>)
<Extension()>
Public Function AddScheme(Of TOptions As {AuthenticationSchemeOptionsNew}, THandler As {AuthenticationSchemeOptionsNew}) (services As IServiceCollection, authenticationScheme As String, configureOptions As Action(Of TOptions)) As IServiceCollection

Type Parameters

TOptions
THandler

Parameters

services
Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection
authenticationScheme
String String String String
configureOptions
Action<TOptions>

Returns

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

AddScheme<TOptions,THandler>(IServiceCollection, String, String, Action<TOptions>) AddScheme<TOptions,THandler>(IServiceCollection, String, String, Action<TOptions>) AddScheme<TOptions,THandler>(IServiceCollection, String, String, Action<TOptions>) AddScheme<TOptions,THandler>(IServiceCollection, String, String, Action<TOptions>)

Warning

This API is now obsolete.

public:
generic <typename TOptions, typename THandler>
 where TOptions : Microsoft::AspNetCore::Authentication::AuthenticationSchemeOptionsgcnew() where THandler : Microsoft::AspNetCore::Authentication::AuthenticationHandler<TOptions>[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddScheme(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, System::String ^ authenticationScheme, System::String ^ displayName, Action<TOptions> ^ configureOptions);
[System.Obsolete("AddScheme is obsolete. Use AddAuthentication().AddScheme instead.")]
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddScheme<TOptions,THandler> (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string authenticationScheme, string displayName, Action<TOptions> configureOptions) where TOptions : Microsoft.AspNetCore.Authentication.AuthenticationSchemeOptionsnew() where THandler : Microsoft.AspNetCore.Authentication.AuthenticationHandler<TOptions>;
static member AddScheme : Microsoft.Extensions.DependencyInjection.IServiceCollection * string * string * Action<'Options (requires 'Options :> Microsoft.AspNetCore.Authentication.AuthenticationSchemeOptions and 'Options : (new : unit -> 'Options))> -> Microsoft.Extensions.DependencyInjection.IServiceCollection (requires 'Options :> Microsoft.AspNetCore.Authentication.AuthenticationSchemeOptions and 'Options : (new : unit -> 'Options) and 'Handler :> Microsoft.AspNetCore.Authentication.AuthenticationHandler<'Options>)
<Extension()>
Public Function AddScheme(Of TOptions As {AuthenticationSchemeOptionsNew}, THandler As {AuthenticationSchemeOptionsNew}) (services As IServiceCollection, authenticationScheme As String, displayName As String, configureOptions As Action(Of TOptions)) As IServiceCollection

Type Parameters

TOptions
THandler

Parameters

services
Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection
authenticationScheme
String String String String
displayName
String String String String
configureOptions
Action<TOptions>

Returns

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

AddScheme<TOptions,THandler>(IServiceCollection, String, String, Action<AuthenticationSchemeBuilder>, Action<TOptions>) AddScheme<TOptions,THandler>(IServiceCollection, String, String, Action<AuthenticationSchemeBuilder>, Action<TOptions>) AddScheme<TOptions,THandler>(IServiceCollection, String, String, Action<AuthenticationSchemeBuilder>, Action<TOptions>) AddScheme<TOptions,THandler>(IServiceCollection, String, String, Action<AuthenticationSchemeBuilder>, Action<TOptions>)

Warning

This API is now obsolete.

public:
generic <typename TOptions, typename THandler>
 where TOptions : Microsoft::AspNetCore::Authentication::AuthenticationSchemeOptionsgcnew() where THandler : Microsoft::AspNetCore::Authentication::AuthenticationHandler<TOptions>[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddScheme(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, System::String ^ authenticationScheme, System::String ^ displayName, Action<Microsoft::AspNetCore::Authentication::AuthenticationSchemeBuilder ^> ^ configureScheme, Action<TOptions> ^ configureOptions);
[System.Obsolete("AddScheme is obsolete. Use AddAuthentication().AddScheme instead.")]
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddScheme<TOptions,THandler> (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string authenticationScheme, string displayName, Action<Microsoft.AspNetCore.Authentication.AuthenticationSchemeBuilder> configureScheme, Action<TOptions> configureOptions) where TOptions : Microsoft.AspNetCore.Authentication.AuthenticationSchemeOptionsnew() where THandler : Microsoft.AspNetCore.Authentication.AuthenticationHandler<TOptions>;
static member AddScheme : Microsoft.Extensions.DependencyInjection.IServiceCollection * string * string * Action<Microsoft.AspNetCore.Authentication.AuthenticationSchemeBuilder> * Action<'Options (requires 'Options :> Microsoft.AspNetCore.Authentication.AuthenticationSchemeOptions and 'Options : (new : unit -> 'Options))> -> Microsoft.Extensions.DependencyInjection.IServiceCollection (requires 'Options :> Microsoft.AspNetCore.Authentication.AuthenticationSchemeOptions and 'Options : (new : unit -> 'Options) and 'Handler :> Microsoft.AspNetCore.Authentication.AuthenticationHandler<'Options>)
<Extension()>
Public Function AddScheme(Of TOptions As {AuthenticationSchemeOptionsNew}, THandler As {AuthenticationSchemeOptionsNew}) (services As IServiceCollection, authenticationScheme As String, displayName As String, configureScheme As Action(Of AuthenticationSchemeBuilder), configureOptions As Action(Of TOptions)) As IServiceCollection

Type Parameters

TOptions
THandler

Parameters

services
Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection Microsoft.Extensions.DependencyInjection.IServiceCollection
authenticationScheme
String String String String
displayName
String String String String
configureOptions
Action<TOptions>

Returns

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

Applies to