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;
        }
Exemple #2
0
 public InviteRequestService()
 {
     db = new KaribouAlphaContext();
 }
Exemple #3
0
 public UserStore(KaribouAlphaContext context) : base(context)
 {
 }