PasswordPolicy class
Password acceptance policy for the built-in credentials flow.
The default follows a length-first policy: passwords must be at least twelve characters and no longer than 1,024 characters. Complexity rules are deliberately opt-in so applications can choose their own policy without forcing predictable composition requirements on users.
Constructors
- PasswordPolicy({int minimumLength = 12, int maximumLength = 1024})
-
Creates a policy with defaults of 12 and 1,024 characters.
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- maximumLength → int
-
Maximum password length accepted during registration and authentication.
final
- minimumLength → int
-
Minimum password length accepted during registration.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
allowsAuthentication(
String password) → bool -
Returns whether
passwordis safe to send to the password verifier. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
validateRegistration(
String password) → String? -
Returns a stable validation code for registration, or
nullwhen valid.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited