PasswordBroker (Auth\Passwords)

PasswordBroker

class PasswordBroker implements PasswordBroker (View source)

Methods

void __construct(TokenRepositoryInterface $tokens, UserProvider $users)

Create a new password broker instance.

string sendResetLink(array $credentials)

Send a password reset link to a user.

mixed reset(array $credentials, Closure $callback)

Reset the password for the given token.

void validator(Closure $callback)

Set a custom password validator.

bool validateNewPassword(array $credentials)

Determine if the passwords match 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)

Create a new password broker instance.

Parameters

TokenRepositoryInterface $tokens
UserProvider $users

Return Value

void

Send a password reset link to a user.

Parameters

array $credentials

Return Value

string

mixed reset(array $credentials, Closure $callback)

Reset the password for the given token.

Parameters

array $credentials
Closure $callback

Return Value

mixed

void validator(Closure $callback)

Set a custom password validator.

Parameters

Closure $callback

Return Value

void

bool validateNewPassword(array $credentials)

Determine if the passwords match for the request.

Parameters

array $credentials

Return Value

bool

CanResetPassword getUser(array $credentials)

Get the user for the given credentials.

Parameters

array $credentials

Return Value

CanResetPassword

Exceptions

UnexpectedValueException

string createToken(CanResetPassword $user)

Create a new password reset token for the given user.

Parameters

CanResetPassword $user

Return Value

string

void deleteToken(string $token)

Delete the given password reset token.

Parameters

string $token

Return Value

void

bool tokenExists(CanResetPassword $user, string $token)

Validate the given password reset token.

Parameters

CanResetPassword $user
string $token

Return Value

bool

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.3/Illuminate/Auth/Passwords/PasswordBroker.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部