Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PwnedPasswordValidator<Account>

Validator which ensures that password wasn't breached before.
In order to determine this, it makes an API call to Have I Been Pwned.

Type parameters

Hierarchy

  • PwnedPasswordValidator

Implements

Constructors

Methods

Constructors

constructor

  • Type parameters

    Parameters

    • breachThreshold: number

      Password breach threshold. When this threshold is reached or exceeded, password is considered unsecure.
      Usually you will want to set this as low as possible, e.g. 1 or 2.

    Returns PwnedPasswordValidator<Account>

Methods

validate

  • validate(password: string): Promise<void>