PasswordResetTokenRepositoryInterface
interface PasswordResetTokenRepositoryInterface (View source)
Persistence for password reset tokens and their rate-limit counters.
Methods
Store a reset token. The raw token is supplied; the implementation stores its hash and findByToken() expects that same hash.
Find an unused, unexpired token by its hashed value.
Mark a token as used. Returns false when the token was already used.
Undo markAsUsed() after the password change it guarded failed, so the link works again.
Count recent attempts for an email address.
Count recent attempts by IP address.
Delete expired tokens and used tokens past their retention window.
Delete a specific token by ID.
Details
bool
create(array $data)
Store a reset token. The raw token is supplied; the implementation stores its hash and findByToken() expects that same hash.
array|null
findByToken(string $token)
Find an unused, unexpired token by its hashed value.
bool
markAsUsed(int $tokenId)
Mark a token as used. Returns false when the token was already used.
bool
releaseClaim(int $tokenId)
Undo markAsUsed() after the password change it guarded failed, so the link works again.
int
countRecentAttempts(string $email, int $seconds)
Count recent attempts for an email address.
int
countRecentAttemptsByIp(string $ip, int $seconds)
Count recent attempts by IP address.
int
deleteExpired()
Delete expired tokens and used tokens past their retention window.
bool
deleteById(int $tokenId)
Delete a specific token by ID.