Class ClaimsPrincipalFactory
Represents a factory class for generating claims-based identities for users.
Implements
IUserClaimsPrincipalFactory<AppIdentityUser>
Inherited Members
UserClaimsPrincipalFactory<AppIdentityUser, AppIdentityRole>.GenerateClaimsAsync(AppIdentityUser)
UserClaimsPrincipalFactory<AppIdentityUser, AppIdentityRole>.RoleManager
UserClaimsPrincipalFactory<AppIdentityUser>.CreateAsync(AppIdentityUser)
UserClaimsPrincipalFactory<AppIdentityUser>.UserManager
UserClaimsPrincipalFactory<AppIdentityUser>.Options
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: DataWeb.Identity
Assembly: DataWeb.Core.dll
Syntax
public class ClaimsPrincipalFactory : UserClaimsPrincipalFactory<AppIdentityUser, AppIdentityRole>, IUserClaimsPrincipalFactory<AppIdentityUser>
Constructors
ClaimsPrincipalFactory(UserManager<AppIdentityUser>, RoleManager<AppIdentityRole>, IOptions<IdentityOptions>, IUserService)
Initializes a new instance of the ClaimsPrincipalFactory class.
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. |
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. |
Overrides
Microsoft.AspNetCore.Identity.UserClaimsPrincipalFactory<DataWeb.Identity.AppIdentityUser, DataWeb.Identity.AppIdentityRole>.GenerateClaimsAsync(DataWeb.Identity.AppIdentityUser)
Implements
Microsoft.AspNetCore.Identity.IUserClaimsPrincipalFactory<TUser>