AuthenticationHandler<TOptions>.InitializeAsync 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
InitializeAsync(AuthenticationScheme, HttpContext) |
初始化处理程序,解析选项并对其进行验证。 |
InitializeAsync(TOptions, HttpContext, ILogger, UrlEncoder) |
每个请求调用一次 Initialize,以便将此实例与适当的状态进行上下文化。 |
InitializeAsync(AuthenticationScheme, HttpContext)
- Source:
- AuthenticationHandler.cs
- Source:
- AuthenticationHandler.cs
- Source:
- 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
参数
- scheme
- AuthenticationScheme
- context
- HttpContext
返回
实现
适用于
InitializeAsync(TOptions, HttpContext, ILogger, UrlEncoder)
每个请求调用一次 Initialize,以便将此实例与适当的状态进行上下文化。
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
返回
异步完成