Share via


DataProtectorTokenProvider<TUser>.ValidateAsync Method

Definition

Validates the protected token for the specified user and purpose as an asynchronous operation.

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 was be used for.

token
String

The token to validate.

manager
UserManager<TUser>

The UserManager<TUser> to retrieve user properties from.

user
TUser

The TUser the token was generated for.

Returns

A Task<TResult> that represents the result of the asynchronous validation, containing true if the token is valid, otherwise false.

Implements

Applies to