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

定义

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

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

参数

user
TUser

应检索其声明的用户。

cancellationToken
CancellationToken

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

返回

一个 Task<TResult> ,其中包含授予用户的声明。

实现

适用于