共用方式為


AuthenticationHttpContextExtensions.AuthenticateAsync 方法

定義

多載

AuthenticateAsync(HttpContext)

使用預設驗證配置來驗證目前的要求。 您可以使用 來設定 DefaultAuthenticateScheme 預設驗證配置。

AuthenticateAsync(HttpContext, String)

使用指定的配置驗證目前的要求。

AuthenticateAsync(HttpContext)

來源:
AuthenticationHttpContextExtensions.cs
來源:
AuthenticationHttpContextExtensions.cs
來源:
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)

來源:
AuthenticationHttpContextExtensions.cs
來源:
AuthenticationHttpContextExtensions.cs
來源:
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

適用於