ParsePasswordChecks (open)
Syntax
LOADLIB "mod::wrd/lib/auth/passwordpolicy.whlib";
RECORD ARRAY FUNCTION ParsePasswordChecks(STRING checks, RECORD options)Parameters
STRING checksPassword validation checks. Space-separated list of checks. Possible checks:
- hibp Check that the password isn't present in the "Have I Been Pwned" database
- minlength:(amount) Make sure that password has at least (amount) characters
- lowercase:(amount) Make sure that password has at least (amount) lowercase characters
- uppercase:(amount) Make sure that password has at least (amount) uppercase characters
- digits:(amount) Make sure that password has at least (amount) digits
- symbols:(amount) Make sure that password has at least (amount) symbols
RECORD optionsOptions
strictThrow on errors, defaults to FALSE
Return value
RECORD ARRAYParsed list of checks
STRING checkToken of the check ("hibp", "minlength", "lowercase", "uppercase", "digits", "symbols", "maxage", "noreuse")
STRING durationDuration string (for checks that have an duration).
INTEGER valueAmount (for checks that have an amount).