public static CinemaStoreUserManager Get(IdentityFactoryOptions <CinemaStoreUserManager> opts, IOwinContext owinContext)
        {
            var manager = new CinemaStoreUserManager(new UserStore <CinemaStoreUser>(new CinemaStoreContext()));

            manager.UserValidator = new UserValidator <CinemaStoreUser>(manager)
            {
                AllowOnlyAlphanumericUserNames = true,
                RequireUniqueEmail             = true
            };

            manager.PasswordValidator = new PasswordValidator
            {
                RequiredLength   = 6,
                RequireDigit     = true,
                RequireUppercase = true,
                RequireLowercase = true
            };

            if (opts.DataProtectionProvider != null)
            {
                var protecotor = opts.DataProtectionProvider.Create("ASP.NET Identity");
                manager.UserTokenProvider =
                    new DataProtectorTokenProvider <CinemaStoreUser>(protecotor);
            }

            return(manager);
        }
 public CinemaStoreSignInManager(CinemaStoreUserManager userManager, IAuthenticationManager authManager)
     : base(userManager, authManager)
 {
 }