IUserClaimsPrincipalFactory<TUser> Interface

Provides an abstraction for a factory to create a System.Security.Claims.ClaimsPrincipal from a user.

Namespace
Microsoft.AspNetCore.Identity
Assemblies
  • Microsoft.AspNetCore.Identity

Syntax

public interface IUserClaimsPrincipalFactory<TUser>
    where TUser : class
interface Microsoft.AspNetCore.Identity.IUserClaimsPrincipalFactory<TUser>

Methods

CreateAsync(TUser)

Creates a System.Security.Claims.ClaimsPrincipal from an user asynchronously.

Arguments:user (TUser) – The user to create a System.Security.Claims.ClaimsPrincipal from.
Return type:System.Threading.Tasks.Task<System.Security.Claims.ClaimsPrincipal>
Returns:The System.Threading.Tasks.Task that represents the asynchronous creation operation, containing the created System.Security.Claims.ClaimsPrincipal.
Task<ClaimsPrincipal> CreateAsync(TUser user)