public static ApplicationUserManager Create(IdentityFactoryOptions <ApplicationUserManager> options, IOwinContext context) { YuriSentaa db = context.Get <YuriSentaa>(); ApplicationUserManager userManager = new ApplicationUserManager(new UserStore <Account>(db)); userManager.PasswordValidator = new ApplicationPasswordValidator { RequiredLength = 6, RequireNonLetterOrDigit = false, RequireDigit = false, RequireLowercase = true, RequireUppercase = true }; userManager.UserValidator = new UserValidator <Account>(userManager) { AllowOnlyAlphanumericUserNames = false, RequireUniqueEmail = true }; //userManager.EmailService = new EmailService(); var dataProtectionProvider = options.DataProtectionProvider; if (dataProtectionProvider != null) { userManager.UserTokenProvider = new DataProtectorTokenProvider <Account>(dataProtectionProvider.Create("ASP.NET Identity")) { //Code for email confirmation and reset password life time TokenLifespan = TimeSpan.FromHours(6) }; } return(userManager); }
public GakuseiController() { this._db = new YuriSentaa(); }
public AccountsController(ApplicationUserManager userManager, ApplicationRoleManager roleManager) { _userManager = userManager; _roleManager = roleManager; db = new YuriSentaa(); }
public KoushiController() { this._db = new YuriSentaa(); }
public KulasuController() { this._db = new YuriSentaa(); }