class PasswordBroker implements PasswordBroker (View source)

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.

void
validator( Closure $callback)

Set a custom password validator.

bool
validateNewPassword( array $credentials)

Determine if the passwords match for the request.

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.

getRepository()

Get the password reset token repository implementation.

Details

at line line 59
void __construct( TokenRepositoryInterface $tokens, UserProvider $users, Mailer $mailer, string $emailView)

Create a new password broker instance.

Parameters

TokenRepositoryInterface $tokens
UserProvider $users
Mailer $mailer
string $emailView

Return Value

void

Send a password reset link to a user.

Parameters

array $credentials
Closure $callback

Return Value

string

Send the password reset link via e-mail.

Parameters

CanResetPassword $user
string $token
Closure $callback

Return Value

int

at line line 129
mixed reset( array $credentials, Closure $callback)

Reset the password for the given token.

Parameters

array $credentials
Closure $callback

Return Value

mixed

at line line 181
void validator( Closure $callback)

Set a custom password validator.

Parameters

Closure $callback

Return Value

void

at line line 192
bool validateNewPassword( array $credentials)

Determine if the passwords match for the request.

Parameters

array $credentials

Return Value

bool

at line line 231
CanResetPassword getUser( array $credentials)

Get the user for the given credentials.

Parameters

array $credentials

Return Value

CanResetPassword

Exceptions

UnexpectedValueException

at line line 250
string createToken( CanResetPassword $user)

Create a new password reset token for the given user.

Parameters

CanResetPassword $user

Return Value

string

at line line 261
void deleteToken( string $token)

Delete the given password reset token.

Parameters

string $token

Return Value

void

at line line 273
bool tokenExists( CanResetPassword $user, string $token)

Validate the given password reset token.

Parameters

CanResetPassword $user
string $token

Return Value

bool

at line line 283
TokenRepositoryInterface getRepository()

Get the password reset token repository implementation.