共用方式為


AuthenticationHandler<TOptions>.InitializeAsync 方法

定義

多載

InitializeAsync(AuthenticationScheme, HttpContext)

初始化處理常式、解析選項並加以驗證。

InitializeAsync(TOptions, HttpContext, ILogger, UrlEncoder)

每個要求會呼叫初始化一次,以適當狀態將此實例內容化。

InitializeAsync(AuthenticationScheme, HttpContext)

來源:
AuthenticationHandler.cs
來源:
AuthenticationHandler.cs
來源:
AuthenticationHandler.cs

初始化處理常式、解析選項並加以驗證。

public:
 virtual System::Threading::Tasks::Task ^ InitializeAsync(Microsoft::AspNetCore::Authentication::AuthenticationScheme ^ scheme, Microsoft::AspNetCore::Http::HttpContext ^ context);
public System.Threading.Tasks.Task InitializeAsync (Microsoft.AspNetCore.Authentication.AuthenticationScheme scheme, Microsoft.AspNetCore.Http.HttpContext context);
abstract member InitializeAsync : Microsoft.AspNetCore.Authentication.AuthenticationScheme * Microsoft.AspNetCore.Http.HttpContext -> System.Threading.Tasks.Task
override this.InitializeAsync : Microsoft.AspNetCore.Authentication.AuthenticationScheme * Microsoft.AspNetCore.Http.HttpContext -> System.Threading.Tasks.Task
Public Function InitializeAsync (scheme As AuthenticationScheme, context As HttpContext) As Task

參數

context
HttpContext

傳回

實作

適用於

InitializeAsync(TOptions, HttpContext, ILogger, UrlEncoder)

每個要求會呼叫初始化一次,以適當狀態將此實例內容化。

public:
 System::Threading::Tasks::Task ^ InitializeAsync(TOptions options, Microsoft::AspNetCore::Http::HttpContext ^ context, Microsoft::Extensions::Logging::ILogger ^ logger, System::Text::Encodings::Web::UrlEncoder ^ encoder);
public System.Threading.Tasks.Task InitializeAsync (TOptions options, Microsoft.AspNetCore.Http.HttpContext context, Microsoft.Extensions.Logging.ILogger logger, System.Text.Encodings.Web.UrlEncoder encoder);
member this.InitializeAsync : 'Options * Microsoft.AspNetCore.Http.HttpContext * Microsoft.Extensions.Logging.ILogger * System.Text.Encodings.Web.UrlEncoder -> System.Threading.Tasks.Task
Public Function InitializeAsync (options As TOptions, context As HttpContext, logger As ILogger, encoder As UrlEncoder) As Task

參數

options
TOptions

應用程式控制行為所傳遞的原始選項

context
HttpContext

要觀察目前要求和回應的公用程式物件

logger
ILogger

用來建立記錄器的記錄處理站

encoder
UrlEncoder

UrlEncoder

傳回

非同步完成

適用於