UserManager<TUser, TKey>.GenerateTwoFactorTokenAsync Method

Gets a token for a specific two factor provider.

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

Syntax

'Declaration
Public Overridable Function GenerateTwoFactorTokenAsync ( _
    userId As TKey, _
    twoFactorProvider As String _
) As Task(Of String)
'Usage
Dim instance As UserManager 
Dim userId As TKey
Dim twoFactorProvider As String 
Dim returnValue As Task(Of String)

returnValue = instance.GenerateTwoFactorTokenAsync(userId, _
    twoFactorProvider)
public virtual Task<string> GenerateTwoFactorTokenAsync(
    TKey userId,
    string twoFactorProvider
)
public:
virtual Task<String^>^ GenerateTwoFactorTokenAsync(
    TKey userId, 
    String^ twoFactorProvider
)
abstract GenerateTwoFactorTokenAsync : 
        userId:'TKey * 
        twoFactorProvider:string -> Task<string> 
override GenerateTwoFactorTokenAsync : 
        userId:'TKey * 
        twoFactorProvider:string -> Task<string> 
public function GenerateTwoFactorTokenAsync(
    userId : TKey, 
    twoFactorProvider : String
) : Task<String>

Parameters

  • userId
    Type: TKey
    The user ID.

Return Value

Type: System.Threading.Tasks.Task<String>
The task representing the asynchronous operation.

See Also

Reference

UserManager<TUser, TKey> Class

Microsoft.AspNet.Identity Namespace

Other Resources

ASP.NET Identity