共用方式為


IUserClaimStore<TUser>.AddClaimsAsync 方法

定義

將宣告新增至使用者作為非同步作業。

public:
 System::Threading::Tasks::Task ^ AddClaimsAsync(TUser user, System::Collections::Generic::IEnumerable<System::Security::Claims::Claim ^> ^ claims, System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task AddClaimsAsync (TUser user, System.Collections.Generic.IEnumerable<System.Security.Claims.Claim> claims, System.Threading.CancellationToken cancellationToken);
abstract member AddClaimsAsync : 'User * seq<System.Security.Claims.Claim> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function AddClaimsAsync (user As TUser, claims As IEnumerable(Of Claim), cancellationToken As CancellationToken) As Task

參數

user
TUser

要加入宣告的使用者。

claims
IEnumerable<Claim>

要加入的 Claim 集合。

cancellationToken
CancellationToken

用於散佈應取消作業通知的 CancellationToken

傳回

工作物件,表示非同步作業。

適用於