public AppUserManager( AppUserStore store, AppClaimsFactory claimsFactory, OAuthAuthorizationServerOptions oAuthServerOptions, OAuthBearerAuthenticationOptions oAuthBearerOptions) : base(store) { _oAuthServerOptions = oAuthServerOptions; _oAuthBearerOptions = oAuthBearerOptions; ClaimsIdentityFactory = claimsFactory; UserValidator = new AppUserValidator(this) { AllowOnlyAlphanumericUserNames = true, RequireUniqueEmail = true }; PasswordValidator = new AppPasswordValidator { RequiredLength = 6, RequireDigit = true }; }
public void AppPasswordValidator_RequiresUppercaseChar() { var passwordValidator = new AppPasswordValidator(); Assert.IsTrue(passwordValidator.RequireUppercase); }
public void AppPasswordValidator_DoesNot_RequireDigit() { var passwordValidator = new AppPasswordValidator(); Assert.IsFalse(passwordValidator.RequireDigit); }
public void AppPasswordValidator_RequiresNonLetterOrDigit() { var passwordValidator = new AppPasswordValidator(); Assert.IsTrue(passwordValidator.RequireNonLetterOrDigit); }
public void AppPasswordValidator_RequiresAtLeast6CharPassword() { var passwordValidator = new AppPasswordValidator(); Assert.AreEqual(6, passwordValidator.RequiredLength); }