Class PasswordResetToken

java.lang.Object
com.ericbouchut.learndev.auth.entity.PasswordResetToken

@Entity public class PasswordResetToken extends Object
A single-use, expiring password-reset token (maps the reset_tokens table). The token column stores the SHA-256 hash of the raw secret sent by email, never the secret itself: a database leak does not yield usable reset links.
  • Constructor Details

    • PasswordResetToken

      public PasswordResetToken()
  • Method Details

    • isUsable

      public boolean isUsable(OffsetDateTime now)
      True when the token can still be consumed (not used, not expired).