public ApplicationUserManager(IUserLockoutStore <IidUser, int> store) : base(store) { if (store == null) { throw new ArgumentNullException("store"); } _userLockoutStore = store; }
public LockingUserManager(IUserLockoutStore <TUser, TKey> store) : base(store) { if (store == null) { throw new ArgumentNullException("store"); } _userLockoutStore = store; }
private IUserLockoutStore <ApplicationUser> GetUserLockoutStore() { IUserLockoutStore <ApplicationUser> store = Store as IUserLockoutStore <ApplicationUser>; if (store != null) { return(store); } throw new NotSupportedException("User store is not of type user lockout store"); }
public FakeUserManager(IUserLockoutStore <User> lockoutStore) : base(lockoutStore, new Mock <IOptions <IdentityOptions> >().Object, new Mock <IPasswordHasher <User> >().Object, new IUserValidator <User> [0], new IPasswordValidator <User> [0], new Mock <ILookupNormalizer>().Object, new Mock <IdentityErrorDescriber>().Object, new Mock <IServiceProvider>().Object, new Mock <ILogger <UserManager <User> > >().Object) { }
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; }