Password.php 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <?php
  2. namespace Illuminate\Support\Facades;
  3. use Illuminate\Contracts\Auth\PasswordBroker;
  4. /**
  5. * @method static \Illuminate\Contracts\Auth\PasswordBroker broker(string|null $name = null)
  6. * @method static string getDefaultDriver()
  7. * @method static void setDefaultDriver(string $name)
  8. * @method static string sendResetLink(array $credentials, \Closure|null $callback = null)
  9. * @method static mixed reset(array $credentials, \Closure $callback)
  10. * @method static \Illuminate\Contracts\Auth\CanResetPassword|null getUser(array $credentials)
  11. * @method static string createToken(\Illuminate\Contracts\Auth\CanResetPassword $user)
  12. * @method static void deleteToken(\Illuminate\Contracts\Auth\CanResetPassword $user)
  13. * @method static bool tokenExists(\Illuminate\Contracts\Auth\CanResetPassword $user, string $token)
  14. * @method static \Illuminate\Auth\Passwords\TokenRepositoryInterface getRepository()
  15. * @method static \Illuminate\Support\Timebox getTimebox()
  16. *
  17. * @see \Illuminate\Auth\Passwords\PasswordBrokerManager
  18. * @see \Illuminate\Auth\Passwords\PasswordBroker
  19. */
  20. class Password extends Facade
  21. {
  22. /**
  23. * Constant representing a successfully sent password reset email.
  24. *
  25. * @var string
  26. */
  27. const ResetLinkSent = PasswordBroker::RESET_LINK_SENT;
  28. /**
  29. * Constant representing a successfully reset password.
  30. *
  31. * @var string
  32. */
  33. const PasswordReset = PasswordBroker::PASSWORD_RESET;
  34. /**
  35. * Constant indicating the user could not be found when attempting a password reset.
  36. *
  37. * @var string
  38. */
  39. const InvalidUser = PasswordBroker::INVALID_USER;
  40. /**
  41. * Constant representing an invalid password reset token.
  42. *
  43. * @var string
  44. */
  45. const InvalidToken = PasswordBroker::INVALID_TOKEN;
  46. /**
  47. * Constant representing a throttled password reset attempt.
  48. *
  49. * @var string
  50. */
  51. const ResetThrottled = PasswordBroker::RESET_THROTTLED;
  52. const RESET_LINK_SENT = PasswordBroker::RESET_LINK_SENT;
  53. const PASSWORD_RESET = PasswordBroker::PASSWORD_RESET;
  54. const INVALID_USER = PasswordBroker::INVALID_USER;
  55. const INVALID_TOKEN = PasswordBroker::INVALID_TOKEN;
  56. const RESET_THROTTLED = PasswordBroker::RESET_THROTTLED;
  57. /**
  58. * Get the registered name of the component.
  59. *
  60. * @return string
  61. */
  62. protected static function getFacadeAccessor()
  63. {
  64. return 'auth.password';
  65. }
  66. }