public AuthenticationRepository() { UserValidator <User, long> userValidator; this._context = new KaribouAlphaContext(); this._userStore = new UserStore(this._context); this._userManager = new UserManager(this._userStore); this._userManager.UserTokenProvider = new DataProtectorTokenProvider <User, long>(Startup.DataProtectionProvider.Create("ASP.NET Identity")) { TokenLifespan = TimeSpan.FromHours(24) } as IUserTokenProvider <User, long>; userValidator = (UserValidator <User, long>) this._userManager.UserValidator; userValidator.RequireUniqueEmail = true; userValidator.AllowOnlyAlphanumericUserNames = false; }
public InviteRequestService() { db = new KaribouAlphaContext(); }
public UserStore(KaribouAlphaContext context) : base(context) { }