Class AuthenticationSettings
Constructors
constructor
Returns AuthenticationSettings
Methods
get Last Password Change
Returns null | Instant
get Num Passwords
Returns number
has TOTP
Returns boolean
is Password Still Secure
Returns boolean
is Used Since
Parameters
- password: string
- cutoff: Instant
Returns Promise<boolean>
to HSON
Returns string
update Password
- updatePassword(
password: string,
options?: { algorithm?: "PLAIN" | "WHBF"; inPlace?: boolean },
): Promise<void>Parameters
- password: string
The new password
Optionaloptions: { algorithm?: "PLAIN" | "WHBF"; inPlace?: boolean }Options for updating the password
Optionalalgorithm?: "PLAIN" | "WHBF"The hash algorithm to use. If not set, use best known method (may change in future versions)
OptionalinPlace?: booleanUpdate the last password in place (if it exists), otherwise add to the list. Used to upgrade passwords to a new algorithm without changing the password history and resetting the password age
Returns Promise<void>
- password: string
verify Password
Parameters
- password: string
Returns Promise<boolean>
Staticfrom HSON
Parameters
- hson: string
Returns AuthenticationSettings
Staticfrom Password Hash
Parameters
- hash: string
Returns AuthenticationSettings
Update the password in this setting