TokenRepositoryInterface.php 934B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. namespace Illuminate\Auth\Passwords;
  3. use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;
  4. interface TokenRepositoryInterface
  5. {
  6. /**
  7. * Create a new token.
  8. *
  9. * @param \Illuminate\Contracts\Auth\CanResetPassword $user
  10. * @return string
  11. */
  12. public function create(CanResetPasswordContract $user);
  13. /**
  14. * Determine if a token record exists and is valid.
  15. *
  16. * @param \Illuminate\Contracts\Auth\CanResetPassword $user
  17. * @param string $token
  18. * @return bool
  19. */
  20. public function exists(CanResetPasswordContract $user, $token);
  21. /**
  22. * Delete a token record.
  23. *
  24. * @param \Illuminate\Contracts\Auth\CanResetPassword $user
  25. * @return void
  26. */
  27. public function delete(CanResetPasswordContract $user);
  28. /**
  29. * Delete expired tokens.
  30. *
  31. * @return void
  32. */
  33. public function deleteExpired();
  34. }