Share via


UserManager<TUser, TKey>.GenerateUserTokenAsync Method (String, TKey)

 

Gets a user token for a specific purpose.

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

Syntax

public virtual Task<string> GenerateUserTokenAsync(
    string purpose,
    TKey userId
)
public:
virtual Task<String^>^ GenerateUserTokenAsync(
    String^ purpose,
    TKey userId
)
abstract GenerateUserTokenAsync : 
        purpose:string *
        userId:'TKey -> Task<string>
override GenerateUserTokenAsync : 
        purpose:string *
        userId:'TKey -> Task<string>
Public Overridable Function GenerateUserTokenAsync (
    purpose As String,
    userId As TKey
) As Task(Of String)

Parameters

  • userId
    Type: TKey

    The user ID.

Return Value

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

The task representing the asynchronous operation.

See Also

UserManager<TUser, TKey> Class
Microsoft.AspNet.Identity Namespace
ASP.NET Identity

Return to top