DefaultPasswordValidationStrategy
The DefaultPasswordValidationStrategy allows you to specify a minimum length and/or
a regular expression to match passwords against. The default maxLength is 72.
TODO:
By default, the minLength will be set to 4. This is rather permissive and is only
this way in order to reduce the risk of backward-compatibility breaks. In the next major version
this default will be made more strict.
- Implements:
PasswordValidationStrategy
constructor
method
(options: { minLength?: number; maxLength?: number; regexp?: RegExp }) => DefaultPasswordValidationStrategyvalidate
method
(ctx: RequestContext, password: string) => boolean | stringWas this chapter helpful?