Password.php 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. *
  16. * @see \Illuminate\Auth\Passwords\PasswordBrokerManager
  17. * @see \Illuminate\Auth\Passwords\PasswordBroker
  18. */
  19. class Password extends Facade
  20. {
  21. /**
  22. * Constant representing a successfully sent reminder.
  23. *
  24. * @var string
  25. */
  26. const RESET_LINK_SENT = PasswordBroker::RESET_LINK_SENT;
  27. /**
  28. * Constant representing a successfully reset password.
  29. *
  30. * @var string
  31. */
  32. const PASSWORD_RESET = PasswordBroker::PASSWORD_RESET;
  33. /**
  34. * Constant representing the user not found response.
  35. *
  36. * @var string
  37. */
  38. const INVALID_USER = PasswordBroker::INVALID_USER;
  39. /**
  40. * Constant representing an invalid token.
  41. *
  42. * @var string
  43. */
  44. const INVALID_TOKEN = PasswordBroker::INVALID_TOKEN;
  45. /**
  46. * Constant representing a throttled reset attempt.
  47. *
  48. * @var string
  49. */
  50. const RESET_THROTTLED = PasswordBroker::RESET_THROTTLED;
  51. /**
  52. * Get the registered name of the component.
  53. *
  54. * @return string
  55. */
  56. protected static function getFacadeAccessor()
  57. {
  58. return 'auth.password';
  59. }
  60. }