Share via


DataProtectorTokenProvider<TUser>.CanGenerateTwoFactorTokenAsync Method

Definition

Returns a Boolean indicating whether a token generated by this instance can be used as a Two Factor Authentication token as an asynchronous operation.

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

Parameters

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 query, containing true if a token generated by this instance can be used as a Two Factor Authentication token, otherwise false.

Implements

Remarks

This method will always return false for instances of DataProtectorTokenProvider<TUser>.

Applies to