Interface GeneratedPasswordRepository


public interface GeneratedPasswordRepository
Port that remembers which accounts only hold a password the server generated and nobody knows: the accounts created by the first sign-in with an external provider. Every account row carries a password hash, so without this mark a provisioned account would count as having a password sign-in method. Setting a password (registration, reset or change) clears the mark. It never returns null.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    isGenerated(UUID userId)
    Tells whether the password of an account is a generated one.
    void
    Marks the password of an account as generated, that is, unknown to its owner.
  • Method Details

    • markGenerated

      void markGenerated(UUID userId)
      Marks the password of an account as generated, that is, unknown to its owner.
      Parameters:
      userId - identifier of the account.
    • isGenerated

      boolean isGenerated(UUID userId)
      Tells whether the password of an account is a generated one.
      Parameters:
      userId - identifier of the account.
      Returns:
      true when the account has no password its owner knows.