AuthenticationHttpContextExtensions.AuthenticateAsync 方法

定义

重载

AuthenticateAsync(HttpContext)

使用默认身份验证方案对当前请求进行身份验证。 可以使用 配置 DefaultAuthenticateScheme默认身份验证方案。

AuthenticateAsync(HttpContext, String)

使用指定的方案对当前请求进行身份验证。

AuthenticateAsync(HttpContext)

Source:
AuthenticationHttpContextExtensions.cs
Source:
AuthenticationHttpContextExtensions.cs
Source:
AuthenticationHttpContextExtensions.cs

使用默认身份验证方案对当前请求进行身份验证。 可以使用 配置 DefaultAuthenticateScheme默认身份验证方案。

public:
[System::Runtime::CompilerServices::Extension]
 static System::Threading::Tasks::Task<Microsoft::AspNetCore::Authentication::AuthenticateResult ^> ^ AuthenticateAsync(Microsoft::AspNetCore::Http::HttpContext ^ context);
public static System.Threading.Tasks.Task<Microsoft.AspNetCore.Authentication.AuthenticateResult> AuthenticateAsync (this Microsoft.AspNetCore.Http.HttpContext context);
static member AuthenticateAsync : Microsoft.AspNetCore.Http.HttpContext -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Authentication.AuthenticateResult>
<Extension()>
Public Function AuthenticateAsync (context As HttpContext) As Task(Of AuthenticateResult)

参数

context
HttpContext

上下文 HttpContext

返回

AuthenticateResult

适用于

AuthenticateAsync(HttpContext, String)

Source:
AuthenticationHttpContextExtensions.cs
Source:
AuthenticationHttpContextExtensions.cs
Source:
AuthenticationHttpContextExtensions.cs

使用指定的方案对当前请求进行身份验证。

public:
[System::Runtime::CompilerServices::Extension]
 static System::Threading::Tasks::Task<Microsoft::AspNetCore::Authentication::AuthenticateResult ^> ^ AuthenticateAsync(Microsoft::AspNetCore::Http::HttpContext ^ context, System::String ^ scheme);
public static System.Threading.Tasks.Task<Microsoft.AspNetCore.Authentication.AuthenticateResult> AuthenticateAsync (this Microsoft.AspNetCore.Http.HttpContext context, string scheme);
public static System.Threading.Tasks.Task<Microsoft.AspNetCore.Authentication.AuthenticateResult> AuthenticateAsync (this Microsoft.AspNetCore.Http.HttpContext context, string? scheme);
static member AuthenticateAsync : Microsoft.AspNetCore.Http.HttpContext * string -> System.Threading.Tasks.Task<Microsoft.AspNetCore.Authentication.AuthenticateResult>
<Extension()>
Public Function AuthenticateAsync (context As HttpContext, scheme As String) As Task(Of AuthenticateResult)

参数

context
HttpContext

上下文 HttpContext

scheme
String

身份验证方案的名称。

返回

AuthenticateResult

适用于