public static ApplicationUserManager Create(IdentityFactoryOptions <ApplicationUserManager> options, IOwinContext context) { var dbContext = MoneyDbContext.Create(); var manager = new ApplicationUserManager(new UserStore <ApplicationUser>(dbContext)); // Configure validation logic for usernames manager.UserValidator = new UserValidator <ApplicationUser>(manager) { AllowOnlyAlphanumericUserNames = false, RequireUniqueEmail = true }; // Configure validation logic for passwords manager.PasswordValidator = new PasswordValidator { RequiredLength = 6, RequireNonLetterOrDigit = true, RequireDigit = true, RequireLowercase = true, RequireUppercase = true, }; var dataProtectionProvider = options.DataProtectionProvider; if (dataProtectionProvider != null) { manager.UserTokenProvider = new DataProtectorTokenProvider <ApplicationUser>(dataProtectionProvider.Create("ASP.NET Identity")); } return(manager); }
public CategoryController(UserManager <ApplicationUser> userManager, MoneyDbContext db) { _userManager = userManager; _db = db; }
public TransactionController(UserManager <ApplicationUser> userManager, MoneyDbContext db) { _userManager = userManager; _db = db; }
public MoneyService() { this.model1 = new MoneyDbContext(); }
public AccountController(UserManager <ApplicationUser> userManager, SignInManager <ApplicationUser> signInManager, MoneyDbContext db) { _userManager = userManager; _signInManager = signInManager; _db = db; }