PasswordBroker
class PasswordBroker implements PasswordBroker (View source)
Properties
protected TokenRepositoryInterface | $tokens | The password token repository. | |
protected UserProvider | $users | The user provider implementation. | |
protected Mailer | $mailer | The mailer instance. | |
protected string | $emailView | The view of the password reset link e-mail. | |
protected Closure | $passwordValidator | The custom password validator callback. |
Methods
void | __construct(TokenRepositoryInterface $tokens, UserProvider $users, Mailer $mailer, string $emailView) Create a new password broker instance. | |
string | sendResetLink(array $credentials, Closure $callback = null) Send a password reset link to a user. | |
int | emailResetLink(CanResetPassword $user, string $token, Closure $callback = null) Send the password reset link via e-mail. | |
mixed | reset(array $credentials, Closure $callback) Reset the password for the given token. | |
CanResetPassword | validateReset(array $credentials) Validate a password reset for the given credentials. | |
void | validator(Closure $callback) Set a custom password validator. | |
bool | validateNewPassword(array $credentials) Determine if the passwords match for the request. | |
bool | validatePasswordWithDefaults(array $credentials) Determine if the passwords are valid for the request. | |
CanResetPassword | getUser(array $credentials) Get the user for the given credentials. | |
string | createToken(CanResetPassword $user) Create a new password reset token for the given user. | |
void | deleteToken(string $token) Delete the given password reset token. | |
bool | tokenExists(CanResetPassword $user, string $token) Validate the given password reset token. | |
TokenRepositoryInterface | getRepository() Get the password reset token repository implementation. |
Details
void __construct(TokenRepositoryInterface $tokens, UserProvider $users, Mailer $mailer, string $emailView)
Create a new password broker instance.
string sendResetLink(array $credentials, Closure $callback = null)
Send a password reset link to a user.
int emailResetLink(CanResetPassword $user, string $token, Closure $callback = null)
Send the password reset link via e-mail.
mixed reset(array $credentials, Closure $callback)
Reset the password for the given token.
protected CanResetPassword validateReset(array $credentials)
Validate a password reset for the given credentials.
void validator(Closure $callback)
Set a custom password validator.
bool validateNewPassword(array $credentials)
Determine if the passwords match for the request.
protected bool validatePasswordWithDefaults(array $credentials)
Determine if the passwords are valid for the request.
CanResetPassword getUser(array $credentials)
Get the user for the given credentials.
string createToken(CanResetPassword $user)
Create a new password reset token for the given user.
void deleteToken(string $token)
Delete the given password reset token.
bool tokenExists(CanResetPassword $user, string $token)
Validate the given password reset token.
TokenRepositoryInterface getRepository()
Get the password reset token repository implementation.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.2/Illuminate/Auth/Passwords/PasswordBroker.html