UserManager<TUser, TKey>.GenerateUserTokenAsync Method
Gets a user token for a specific purpose.
Namespace: Microsoft.AspNet.Identity
Assembly: Microsoft.AspNet.Identity.Core (in Microsoft.AspNet.Identity.Core.dll)
'Declaration
Public Overridable Function GenerateUserTokenAsync ( _
purpose As String, _
userId As TKey _
) As Task(Of String)
'Usage
Dim instance As UserManager
Dim purpose As String
Dim userId As TKey
Dim returnValue As Task(Of String)
returnValue = instance.GenerateUserTokenAsync(purpose, _
userId)
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 function GenerateUserTokenAsync(
purpose : String,
userId : TKey
) : Task<String>
- purpose
Type: System.String
The token use.
- userId
Type: TKey
The user ID.
Type: System.Threading.Tasks.Task<String>
The task representing the asynchronous operation.
UserManager<TUser, TKey> Class