public static DefaultUserManager Create(IdentityFactoryOptions <DefaultUserManager> options, IOwinContext context)
        {
            var manager = new DefaultUserManager(new UserStore <CustomUser, CustomIdentityRole, int, CustomIdentityUserLogin, CustomIdentityUserRole, CustomIdentityUserClaim>(context.Get <RoshamboContext>()));

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

            // Configure validation logic for passwords
            manager.PasswordValidator = new PasswordValidator
            {
                RequiredLength          = 4,
                RequireNonLetterOrDigit = false,
                RequireDigit            = true,
                RequireLowercase        = true,
                RequireUppercase        = true,
            };

            // Configure user lockout defaults
            manager.UserLockoutEnabledByDefault          = true;
            manager.DefaultAccountLockoutTimeSpan        = TimeSpan.FromMinutes(5);
            manager.MaxFailedAccessAttemptsBeforeLockout = 5;

            var dataProtectionProvider = options.DataProtectionProvider;

            if (dataProtectionProvider != null)
            {
                manager.UserTokenProvider =
                    new DataProtectorTokenProvider <CustomUser, int>(dataProtectionProvider.Create("ASP.NET Identity"));
            }
            return(manager);
        }
 public DefaultSignInManager(DefaultUserManager userManager, IAuthenticationManager authenticationManager)
     : base(userManager, authenticationManager)
 {
 }