UserManager<TUser>.GetUserAsync(ClaimsPrincipal) UserManager<TUser>.GetUserAsync(ClaimsPrincipal) UserManager<TUser>.GetUserAsync(ClaimsPrincipal) Method

Definition

Returns the user corresponding to the IdentityOptions.ClaimsIdentity.UserIdClaimType claim in the principal or null.

public virtual System.Threading.Tasks.Task<TUser> GetUserAsync (System.Security.Claims.ClaimsPrincipal principal);
abstract member GetUserAsync : System.Security.Claims.ClaimsPrincipal -> System.Threading.Tasks.Task<'User (requires 'User : null)>
override this.GetUserAsync : System.Security.Claims.ClaimsPrincipal -> System.Threading.Tasks.Task<'User (requires 'User : null)>
Public Overridable Function GetUserAsync (principal As ClaimsPrincipal) As Task(Of TUser)

Parameters

principal
ClaimsPrincipal ClaimsPrincipal ClaimsPrincipal

The principal which contains the user id claim.

Returns

Task<TUser>

The user corresponding to the IdentityOptions.ClaimsIdentity.UserIdClaimType claim in the principal or null

Applies to