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