共用方式為


UserStore<TUser,TRole,TContext,TKey,TUserClaim,TUserRole,TUserLogin,TUserToken,TRoleClaim>.AddClaimsAsync 方法

定義

claims 指定的 加入指定的 user

public virtual System.Threading.Tasks.Task AddClaimsAsync (TUser user, System.Collections.Generic.IEnumerable<System.Security.Claims.Claim> claims, System.Threading.CancellationToken cancellationToken = default);
public override System.Threading.Tasks.Task AddClaimsAsync (TUser user, System.Collections.Generic.IEnumerable<System.Security.Claims.Claim> claims, System.Threading.CancellationToken cancellationToken = default);
abstract member AddClaimsAsync : 'User * seq<System.Security.Claims.Claim> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.AddClaimsAsync : 'User * seq<System.Security.Claims.Claim> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.AddClaimsAsync : 'User * seq<System.Security.Claims.Claim> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Overridable Function AddClaimsAsync (user As TUser, claims As IEnumerable(Of Claim), Optional cancellationToken As CancellationToken = Nothing) As Task
Public Overrides Function AddClaimsAsync (user As TUser, claims As IEnumerable(Of Claim), Optional cancellationToken As CancellationToken = Nothing) As Task

參數

user
TUser

要加入宣告的使用者。

claims
IEnumerable<Claim>

要新增至使用者的宣告。

cancellationToken
CancellationToken

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

傳回

表示非同步作業的 Task

實作

適用於