RoleStore<TRole,TContext,TKey,TUserRole,TRoleClaim>.AddClaimAsync 方法

定义

claim将给定的 添加到指定的 role

public System.Threading.Tasks.Task AddClaimAsync (TRole role, System.Security.Claims.Claim claim, System.Threading.CancellationToken cancellationToken = default);
public virtual System.Threading.Tasks.Task AddClaimAsync (TRole role, System.Security.Claims.Claim claim, System.Threading.CancellationToken cancellationToken = default);
abstract member AddClaimAsync : 'Role * System.Security.Claims.Claim * System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.AddClaimAsync : 'Role * System.Security.Claims.Claim * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function AddClaimAsync (role As TRole, claim As Claim, Optional cancellationToken As CancellationToken = Nothing) As Task
Public Overridable Function AddClaimAsync (role As TRole, claim As Claim, Optional cancellationToken As CancellationToken = Nothing) As Task

参数

role
TRole

要向其添加声明的角色。

claim
Claim

要添加到角色的声明。

cancellationToken
CancellationToken

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

返回

表示异步操作的 Task

实现

适用于