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

定义

获取与指定 role 为异步操作的 关联的声明。

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

参数

role
TRole

应检索其声明的角色。

cancellationToken
CancellationToken

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

返回

一个 Task<TResult> ,包含授予角色的声明。

实现

适用于