TotpSecurityStampBasedTokenProvider<TUser>.ValidateAsync Method

Definition

Returns a flag indicating whether the specified token is valid for the given user and purpose.

public:
 virtual System::Threading::Tasks::Task<bool> ^ ValidateAsync(System::String ^ purpose, System::String ^ token, Microsoft::AspNetCore::Identity::UserManager<TUser> ^ manager, TUser user);
public virtual System.Threading.Tasks.Task<bool> ValidateAsync (string purpose, string token, Microsoft.AspNetCore.Identity.UserManager<TUser> manager, TUser user);
abstract member ValidateAsync : string * string * Microsoft.AspNetCore.Identity.UserManager<'User (requires 'User : null)> * 'User -> System.Threading.Tasks.Task<bool>
override this.ValidateAsync : string * string * Microsoft.AspNetCore.Identity.UserManager<'User (requires 'User : null)> * 'User -> System.Threading.Tasks.Task<bool>
Public Overridable Function ValidateAsync (purpose As String, token As String, manager As UserManager(Of TUser), user As TUser) As Task(Of Boolean)

Parameters

purpose
String

The purpose the token will be used for.

token
String

The token to validate.

manager
UserManager<TUser>

The UserManager<TUser> that can be used to retrieve user properties.

user
TUser

The user a token should be validated for.

Returns

The Task that represents the asynchronous operation, containing the a flag indicating the result of validating the tokenuser and purpose. The task will return true if the token is valid, otherwise false.

Implements

Applies to