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,用于传播应取消操作的通知。

返回

表示异步操作的任务对象。

适用于