PasswordValidationConfig class final
Configuration rules for valid passwords.
Contains constraints such as length limit, complexity requirements, etc.
- Annotations
-
- @immutable
Constructors
-
PasswordValidationConfig({int minLength = 8, int maxLength = 128, int minComplexityScore = 3, int minAsciiCode = 32, int maxAsciiCode = 126, double sequentialRunFactor = 0.5, Set<
String> commonPasswords = _defaultCommonPasswords, List<String> commonPrefixes = _defaultCommonPrefixes}) -
Creates a PasswordValidationConfig with optional customized constraints.
const
- PasswordValidationConfig.lenient()
-
Creates a more loosely configured PasswordValidationConfig.
factory
- PasswordValidationConfig.strict()
-
Creates a highly constrained PasswordValidationConfig.
factory
Properties
-
commonPasswords
→ Set<
String> -
Set of blacklisted common passwords.
final
-
commonPrefixes
→ List<
String> -
List of blacklisted common prefixes.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- maxAsciiCode → int
-
The maximum allowed ASCII character code.
final
- maxLength → int
-
The maximum allowed length of the password.
final
- minAsciiCode → int
-
The minimum allowed ASCII character code.
final
- minComplexityScore → int
-
The required minimum complexity score.
final
- minLength → int
-
The required minimum length of the password.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sequentialRunFactor → double
-
Threshold for disallowing sequential runs of characters.
final
Methods
-
copyWith(
{int? minLength, int? maxLength, int? minComplexityScore, int? minAsciiCode, int? maxAsciiCode, double? sequentialRunFactor, Set< String> ? commonPasswords, List<String> ? commonPrefixes}) → PasswordValidationConfig - Returns a copy of this config with the given fields replaced.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override