共用方式為


UserStoreBase<TUser,TKey,TUserClaim,TUserLogin,TUserToken>.SetTokenAsync 方法

定義

設定特定使用者的權杖值。

public:
 virtual System::Threading::Tasks::Task ^ SetTokenAsync(TUser user, System::String ^ loginProvider, System::String ^ name, System::String ^ value, System::Threading::CancellationToken cancellationToken);
public virtual System.Threading.Tasks.Task SetTokenAsync (TUser user, string loginProvider, string name, string value, System.Threading.CancellationToken cancellationToken);
public virtual 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
override this.SetTokenAsync : 'User * string * string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Overridable 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

實作

適用於