TotpSecurityStampBasedTokenProvider<TUser>.CanGenerateTwoFactorTokenAsync Method

Definition

Returns a flag indicating whether the token provider can generate a token suitable for two-factor authentication token for the specified user.

public:
 abstract System::Threading::Tasks::Task<bool> ^ CanGenerateTwoFactorTokenAsync(Microsoft::AspNetCore::Identity::UserManager<TUser> ^ manager, TUser user);
public abstract 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>
Public MustOverride Function CanGenerateTwoFactorTokenAsync (manager As UserManager(Of TUser), user As TUser) As Task(Of Boolean)

Parameters

manager
UserManager<TUser>

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

user
TUser

The user a token could be generated for.

Returns

The Task that represents the asynchronous operation, containing the a flag indicating if a two factor token could be generated by this provider for the specified user. The task will return true if a two-factor authentication token could be generated, otherwise false.

Implements

Applies to