AuthenticationHandler<TOptions>.InitializeAsync Method

Definition

Overloads

InitializeAsync(AuthenticationScheme, HttpContext)

Initialize the handler, resolve the options and validate them.

InitializeAsync(TOptions, HttpContext, ILogger, UrlEncoder)

Initialize is called once per request to contextualize this instance with appropriate state.

InitializeAsync(AuthenticationScheme, HttpContext)

Source:
AuthenticationHandler.cs
Source:
AuthenticationHandler.cs
Source:
AuthenticationHandler.cs

Initialize the handler, resolve the options and validate them.

C#
public System.Threading.Tasks.Task InitializeAsync (Microsoft.AspNetCore.Authentication.AuthenticationScheme scheme, Microsoft.AspNetCore.Http.HttpContext context);

Parameters

context
HttpContext

Returns

Implements

Applies to

ASP.NET Core 9.0 and other versions
Product Versions
ASP.NET Core 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0

InitializeAsync(TOptions, HttpContext, ILogger, UrlEncoder)

Initialize is called once per request to contextualize this instance with appropriate state.

C#
public System.Threading.Tasks.Task InitializeAsync (TOptions options, Microsoft.AspNetCore.Http.HttpContext context, Microsoft.Extensions.Logging.ILogger logger, System.Text.Encodings.Web.UrlEncoder encoder);

Parameters

options
TOptions

The original options passed by the application control behavior

context
HttpContext

The utility object to observe the current request and response

logger
ILogger

The logging factory used to create loggers

encoder
UrlEncoder

The UrlEncoder.

Returns

async completion

Applies to

ASP.NET Core 1.1 and ASP.NET Core 1.0
Product Versions
ASP.NET Core 1.0, 1.1