Search
Preparing search index...
The search index is not available
@thermopylae/lib.authentication
Thermopylae
Github
Options
All
Public
Public/Protected
All
Inherited
Only exported
Menu
managers/password/strength/length-policy
PasswordLengthValidator
Modules
{"Authentication Engine":"engine","Error":"error","Authentication":{"Step":"authentication_step","Challenge Response":"authentication_steps_challenge_response_step","Recaptcha":"authentication_steps_recaptcha_step","Two Factor":{"Interface":"authentication_2fa_interface","Email":"authentication_2fa_email","Sms":"authentication_2fa_sms","Totp":"authentication_2fa_totp"}},"Password":{"Hashing":{"Options":"managers_password","Interface":"managers_password_hash","Argon2":"managers_password_hash_argon2"},"Strength":{"Interface":"managers_password_strength_policy","Length":"managers_password_strength_length_policy","Pwned":"managers_password_strength_pwned_policy","Strength":"managers_password_strength_strength_policy"}},"Typings":{"Contexts":"types_contexts","Enums":"types_enums","Hooks":"types_hooks","Models":"types_models","Repositories":"types_repositories","Sessions":"types_sessions","Secret Encryption":"helpers_secret_encryptor","Side Channels":"types_side_channels"}}
Class PasswordLengthValidator<Account>
Validator which ensures that password length is in the valid range.
Type parameters
Account
:
AccountModel
Hierarchy
PasswordLengthValidator
Implements
PasswordStrengthPolicyValidator
<
Account
>
Constructors
constructor
Methods
validate
Constructors
constructor
new
Password
Length
Validator<Account>
(
minLength
?:
number
, maxLength
?:
number
)
:
PasswordLengthValidator
<
Account
>
Type parameters
Account
:
AccountModel
Parameters
minLength:
number
= 12
maxLength:
number
= 4_096
Returns
PasswordLengthValidator
<
Account
>
Methods
validate
validate
(
password
:
string
)
:
Promise
<
void
>
Validates password strength.
Parameters
password:
string
Returns
Promise
<
void
>
Password
Length
Validator
constructor
validate
Validator which ensures that password length is in the valid range.