Class ClaimsPrincipalFactory
Represents a factory class for generating claims-based identities for users.
Inheritance
ClaimsPrincipalFactory
Implements
Inherited Members
Namespace: DataWeb.Identity
Assembly: DataWeb.Core.dll
Syntax
public class ClaimsPrincipalFactory : UserClaimsPrincipalFactory<AppIdentityUser, AppIdentityRole>, IUserClaimsPrincipalFactory<AppIdentityUser>
Remarks
Initializes a new instance of the ClaimsPrincipalFactory class.
Constructors
ClaimsPrincipalFactory(UserManager<AppIdentityUser>, RoleManager<AppIdentityRole>, IOptions<IdentityOptions>, IUserService)
Represents a factory class for generating claims-based identities for users.
Declaration
public ClaimsPrincipalFactory(UserManager<AppIdentityUser> userManager, RoleManager<AppIdentityRole> roleManager, IOptions<IdentityOptions> optionsAccessor, IUserService userService)
Parameters
Type | Name | Description |
---|---|---|
UserManager<AppIdentityUser> | userManager | The user manager to use. |
RoleManager<AppIdentityRole> | roleManager | The role manager to use. |
IOptions<IdentityOptions> | optionsAccessor | The identity options to use. |
IUserService | userService | The user service to use. |
Remarks
Initializes a new instance of the ClaimsPrincipalFactory class.
Methods
GenerateClaimsAsync(AppIdentityUser)
Generates a claims identity for the specified user.
Declaration
protected override Task<ClaimsIdentity> GenerateClaimsAsync(AppIdentityUser identityUser)
Parameters
Type | Name | Description |
---|---|---|
AppIdentityUser | identityUser | The user for whom a claims identity is to be generated. |
Returns
Type | Description |
---|---|
Task<ClaimsIdentity> | The claims identity for the user. |