共用方式為


SecurityStampValidator.ValidateAsync<TValidator> 方法

定義

用來根據使用者的預存安全性戳記來驗證 TwoFactorUserIdSchemeTwoFactorRememberMeScheme Cookie。

public:
generic <typename TValidator>
 where TValidator : Microsoft::AspNetCore::Identity::ISecurityStampValidator static System::Threading::Tasks::Task ^ ValidateAsync(Microsoft::AspNetCore::Authentication::Cookies::CookieValidatePrincipalContext ^ context);
public static System.Threading.Tasks.Task ValidateAsync<TValidator> (Microsoft.AspNetCore.Authentication.Cookies.CookieValidatePrincipalContext context) where TValidator : Microsoft.AspNetCore.Identity.ISecurityStampValidator;
static member ValidateAsync : Microsoft.AspNetCore.Authentication.Cookies.CookieValidatePrincipalContext -> System.Threading.Tasks.Task (requires 'Validator :> Microsoft.AspNetCore.Identity.ISecurityStampValidator)
Public Shared Function ValidateAsync(Of TValidator As ISecurityStampValidator) (context As CookieValidatePrincipalContext) As Task

類型參數

TValidator

參數

context
CookieValidatePrincipalContext

包含 ClaimsPrincipal 要驗證之 和 AuthenticationProperties 的內容。

傳回

適用於