public UserStore( IDbContext dbContext, IRoleProvider roleProvider, IRoleClaimStore <IRole> roleClaimStore, ILookupNormalizer keyNormalizer) { _dbContext = dbContext; _roleProvider = roleProvider; _roleClaimStore = roleClaimStore; _keyNormalizer = keyNormalizer; }
public AccessController( OpenIddictApplicationManager <OpenIdApplication> applicationManager, IOptions <IdentityOptions> identityOptions, IStringLocalizer <AccessController> localizer, SignInManager <User> signInManager, UserManager <User> userManager, IRoleClaimStore <Role> roleStore) { T = localizer; _applicationManager = applicationManager; _identityOptions = identityOptions; _signInManager = signInManager; _userManager = userManager; _roleStore = roleStore; }
public UserStore( IDbContext dbcontext, IRoleService roleService, IRoleClaimStore <IRole> roleClaimStore, ILookupNormalizer keyNormalizer, ILogger <UserStore> logger, IEnumerable <IUserEventHandler> handlers) { _dbcontext = dbcontext; _roleService = roleService; _roleClaimStore = roleClaimStore; _keyNormalizer = keyNormalizer; _logger = logger; Handlers = handlers; }
public DiTestController( // the Microsoft.AspNetCore.Identity User and Role Manager classes RoleManager <IdentityRole> roleManager, UserManager <ApplicationUser> userManager, IIdentityDatabaseContext <ApplicationUser, IdentityRole, string> identityDatabaseContext, // if want to use with SOLID and Interface Segregation Principle, then can just use the specific interface that need // these interfaces are all implemented by UserStore IUserStore <ApplicationUser> userStore, IUserLoginStore <ApplicationUser> userLoginStore, IUserRoleStore <ApplicationUser> userRoleStore, IUserClaimStore <ApplicationUser> userClaimStore, IUserPasswordStore <ApplicationUser> userPasswordStore, IUserSecurityStampStore <ApplicationUser> userSecurityStampStore, IUserEmailStore <ApplicationUser> userEmailStore, IUserLockoutStore <ApplicationUser> userLockoutStore, IUserPhoneNumberStore <ApplicationUser> userPhoneNumberStore, IUserTwoFactorStore <ApplicationUser> userTwoFactorStore, IQueryableUserStore <ApplicationUser> queryableUserStore, // these interfaces are all implemented by RoleStore IRoleStore <IdentityRole> roleStore, IRoleClaimStore <IdentityRole> roleClaimStore, IQueryableRoleStore <IdentityRole> queryableRoleStore ) { _roleManager = roleManager; _userManager = userManager; _identityDatabaseContext = identityDatabaseContext; _userStore = userStore; _userLoginStore = userLoginStore; _userRoleStore = userRoleStore; _userClaimStore = userClaimStore; _userPasswordStore = userPasswordStore; _userSecurityStampStore = userSecurityStampStore; _userEmailStore = userEmailStore; _userLockoutStore = userLockoutStore; _userPhoneNumberStore = userPhoneNumberStore; _userTwoFactorStore = userTwoFactorStore; _queryableUserStore = queryableUserStore; _roleStore = roleStore; _roleClaimStore = roleClaimStore; _queryableRoleStore = queryableRoleStore; }
public ApplicationRoleManager(IRoleStore <ApplicationRole> store, IEnumerable <IRoleValidator <ApplicationRole> > roleValidators, ILookupNormalizer keyNormalizer, IdentityErrorDescriber errors, ILogger <RoleManager <ApplicationRole> > logger) : base(store, roleValidators, keyNormalizer, errors, logger) { _RoleClaimStore = (IRoleClaimStore <ApplicationRole>)store; }
/// <summary> /// Creates the store /// </summary> /// <param name="client">Orleans cluster client</param> /// <param name="roleStore">The corresponding role store</param> public OrleansUserStore(IClusterClient client, IRoleClaimStore <TRole> roleStore) : base(new IdentityErrorDescriber()) { _client = client; _roleStore = roleStore; }
/// <summary> /// 初始化类<see cref="IdentityRoleManager{TRole}"/>。 /// </summary> /// <param name="repository">用户组数据库操作接口。</param> /// <param name="store">用户组存储接口实例。</param> protected IdentityRoleManager(IRepository <TRole> repository, IRoleStore <TRole> store) { Repository = repository; _store = store as IRoleClaimStore <TRole>; }