AuthenticationHandler<TOptions>.InitializeAsync 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
InitializeAsync(AuthenticationScheme, HttpContext) |
初始化處理常式、解析選項並加以驗證。 |
InitializeAsync(TOptions, HttpContext, ILogger, UrlEncoder) |
每個要求會呼叫初始化一次,以適當狀態將此實例內容化。 |
InitializeAsync(AuthenticationScheme, HttpContext)
初始化處理常式、解析選項並加以驗證。
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
參數
- scheme
- AuthenticationScheme
- 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
傳回
非同步完成