Delen via


UserClaimsPrincipalFactory<TUser> Class

Definition

Provides methods to create a claims principal for a given user.

generic <typename TUser>
 where TUser : classpublic ref class UserClaimsPrincipalFactory : Microsoft::AspNetCore::Identity::IUserClaimsPrincipalFactory<TUser>
public class UserClaimsPrincipalFactory<TUser> : Microsoft.AspNetCore.Identity.IUserClaimsPrincipalFactory<TUser> where TUser : class
type UserClaimsPrincipalFactory<'User (requires 'User : null)> = class
    interface IUserClaimsPrincipalFactory<'User (requires 'User : null)>
Public Class UserClaimsPrincipalFactory(Of TUser)
Implements IUserClaimsPrincipalFactory(Of TUser)

Type Parameters

TUser

The type used to represent a user.

Inheritance
UserClaimsPrincipalFactory<TUser>
Derived
Implements

Constructors

UserClaimsPrincipalFactory<TUser>(UserManager<TUser>, IOptions<IdentityOptions>)

Initializes a new instance of the UserClaimsPrincipalFactory<TUser> class.

Properties

Options

Gets the IdentityOptions for this factory.

UserManager

Gets the UserManager<TUser> for this factory.

Methods

CreateAsync(TUser)

Creates a ClaimsPrincipal from an user asynchronously.

GenerateClaimsAsync(TUser)

Generate the claims for a user.

Applies to