View file vendor/illuminate/contracts/Auth/PasswordBroker.php

File size: 1.26Kb
  1. <?php
  2.  
  3. namespace Illuminate\Contracts\Auth;
  4.  
  5. use Closure;
  6.  
  7. interface PasswordBroker
  8. {
  9. /**
  10. * Constant representing a successfully sent reminder.
  11. *
  12. * @var string
  13. */
  14. const RESET_LINK_SENT = 'passwords.sent';
  15.  
  16. /**
  17. * Constant representing a successfully reset password.
  18. *
  19. * @var string
  20. */
  21. const PASSWORD_RESET = 'passwords.reset';
  22.  
  23. /**
  24. * Constant representing the user not found response.
  25. *
  26. * @var string
  27. */
  28. const INVALID_USER = 'passwords.user';
  29.  
  30. /**
  31. * Constant representing an invalid token.
  32. *
  33. * @var string
  34. */
  35. const INVALID_TOKEN = 'passwords.token';
  36.  
  37. /**
  38. * Constant representing a throttled reset attempt.
  39. *
  40. * @var string
  41. */
  42. const RESET_THROTTLED = 'passwords.throttled';
  43.  
  44. /**
  45. * Send a password reset link to a user.
  46. *
  47. * @param array $credentials
  48. * @param \Closure|null $callback
  49. * @return string
  50. */
  51. public function sendResetLink(array $credentials, Closure $callback = null);
  52.  
  53. /**
  54. * Reset the password for the given token.
  55. *
  56. * @param array $credentials
  57. * @param \Closure $callback
  58. * @return mixed
  59. */
  60. public function reset(array $credentials, Closure $callback);
  61. }