EmailTokenProvider<TUser> Class

TokenProvider that generates tokens from the user’s security stamp and notifies a user via email.

Namespace
Microsoft.AspNetCore.Identity
Assemblies
  • Microsoft.AspNetCore.Identity

Inheritance Hierarchy

Syntax

public class EmailTokenProvider<TUser> : TotpSecurityStampBasedTokenProvider<TUser>, IUserTwoFactorTokenProvider<TUser> where TUser : class
class Microsoft.AspNetCore.Identity.EmailTokenProvider<TUser>

Methods

CanGenerateTwoFactorTokenAsync(Microsoft.AspNetCore.Identity.UserManager<TUser>, TUser)

Checks if a two factor authentication token can be generated for the specified <em>user</em>.

Arguments:
Return type:

System.Threading.Tasks.Task<System.Boolean>

Returns:

True if the user has an email address set, otherwise false.

public override Task<bool> CanGenerateTwoFactorTokenAsync(UserManager<TUser> manager, TUser user)
GetUserModifierAsync(System.String, Microsoft.AspNetCore.Identity.UserManager<TUser>, TUser)

Returns the a value for the user used as entropy in the generated token.

Arguments:
Return type:

System.Threading.Tasks.Task<System.String>

Returns:

A string suitable for use as entropy in token generation.

public override Task<string> GetUserModifierAsync(string purpose, UserManager<TUser> manager, TUser user)