Language

EmailTokenProvider<TUser, TKey> Class

 

Represents a token provider that generates tokens from the user's security stamp and notifies a user via their email.

Namespace:   Microsoft.AspNet.Identity Assembly:  Microsoft.AspNet.Identity.Core (in Microsoft.AspNet.Identity.Core.dll)

Inheritance Hierarchy

System.Object   Microsoft.AspNet.Identity.TotpSecurityStampBasedTokenProvider<TUser, TKey>     Microsoft.AspNet.Identity.EmailTokenProvider<TUser, TKey>       Microsoft.AspNet.Identity.EmailTokenProvider<TUser>

Syntax

public class EmailTokenProvider<TUser, TKey> : TotpSecurityStampBasedTokenProvider<TUser, TKey>
where TUser : class, IUser<TKey>
where TKey : object, IEquatable<TKey>
generic<typename TUser, typename TKey>
where TUser : ref class, IUser<TKey>
where TKey : Object, IEquatable<TKey>
public ref class EmailTokenProvider : TotpSecurityStampBasedTokenProvider<TUser, TKey>
type EmailTokenProvider<'TUser, 'TKey when 'TUser : not struct and IUser<'TKey> when 'TKey : Object and IEquatable<'TKey>> =
    class
        inherit TotpSecurityStampBasedTokenProvider<'TUser, 'TKey>
    end
Public Class EmailTokenProvider(Of TUser As { Class, IUser(Of TKey) }, TKey As { Object, IEquatable(Of TKey) })
    Inherits TotpSecurityStampBasedTokenProvider(Of TUser, TKey)

Type Parameters

  • TUser The type of the user.
  • TKey The type of the key.

Constructors

Name Description
EmailTokenProvider<TUser, TKey>() Initializes a new instance of the EmailTokenProvider<TUser, TKey> class.

Properties

Name Description
BodyFormat Gets or sets the e-mail body which should contain a formatted string which the token will be the only argument.
Subject Gets or sets the e-mail subject used when a token notification is received.

Methods

Name Description
Equals(Object) (Inherited from Object.)
Finalize() (Inherited from Object.)
GenerateAsync(String, UserManager<TUser, TKey>, TUser) Asynchronously generates a token for the user using their security stamp.(Inherited from TotpSecurityStampBasedTokenProvider<TUser, TKey>.)
GetHashCode() (Inherited from Object.)
GetType() (Inherited from Object.)
GetUserModifierAsync(String, UserManager<TUser, TKey>, TUser) Returns the email of the user for entropy in the token.(Overrides TotpSecurityStampBasedTokenProvider<TUser, TKey>.GetUserModifierAsync(String, UserManager<TUser, TKey>, TUser).)
IsValidProviderForUserAsync(UserManager<TUser, TKey>, TUser) Specifies whether the user has an email set.(Overrides TotpSecurityStampBasedTokenProvider<TUser, TKey>.IsValidProviderForUserAsync(UserManager<TUser, TKey>, TUser).)
MemberwiseClone() (Inherited from Object.)
NotifyAsync(String, UserManager<TUser, TKey>, TUser) Notifies the user with a token via email using the Subject and BodyFormat.(Overrides TotpSecurityStampBasedTokenProvider<TUser, TKey>.NotifyAsync(String, UserManager<TUser, TKey>, TUser).)
ToString() (Inherited from Object.)
ValidateAsync(String, String, UserManager<TUser, TKey>, TUser) Asynchronously validates the token for the user.(Inherited from TotpSecurityStampBasedTokenProvider<TUser, TKey>.)

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Microsoft.AspNet.Identity Namespace [ASP.NET Identity](https://go.microsoft.com/fwlink/p/?linkid=393664.

Return to top