UserStoreBase<TUser,TRole,TKey,TUserClaim,TUserRole,TUserLogin,TUserToken,TRoleClaim>.GetRolesAsync Method

Definition

Retrieves the roles the specified user is a member of.

public abstract System.Threading.Tasks.Task<System.Collections.Generic.IList<string>> GetRolesAsync (TUser user, System.Threading.CancellationToken cancellationToken = default);
abstract member GetRolesAsync : 'User * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Generic.IList<string>>
Public MustOverride Function GetRolesAsync (user As TUser, Optional cancellationToken As CancellationToken = Nothing) As Task(Of IList(Of String))

Parameters

user
TUser

The user whose roles should be retrieved.

cancellationToken
CancellationToken

The CancellationToken used to propagate notifications that the operation should be canceled.

Returns

A Task<TResult> that contains the roles the user is a member of.

Implements

Applies to