IUserAuthenticationTokenStore<TUser>.SetTokenAsync 方法

定义

设置特定用户的令牌值。

public:
 System::Threading::Tasks::Task ^ SetTokenAsync(TUser user, System::String ^ loginProvider, System::String ^ name, System::String ^ value, System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task SetTokenAsync (TUser user, string loginProvider, string name, string value, System.Threading.CancellationToken cancellationToken);
public System.Threading.Tasks.Task SetTokenAsync (TUser user, string loginProvider, string name, string? value, System.Threading.CancellationToken cancellationToken);
abstract member SetTokenAsync : 'User * string * string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function SetTokenAsync (user As TUser, loginProvider As String, name As String, value As String, cancellationToken As CancellationToken) As Task

参数

user
TUser

用户。

loginProvider
String

令牌的身份验证提供程序。

name
String

令牌的名称。

value
String

令牌的值。

cancellationToken
CancellationToken

CancellationToken,用于传播应取消操作的通知。

返回

表示异步操作的 Task

适用于