PasswordBroker
class PasswordBroker implements PasswordBroker
Constants
| SENDING_BROKER_CONTEXT_KEY |
The coroutine context key holding the broker name currently sending a reset link. |
Properties
| protected Timebox | $timebox | The timebox instance. |
Methods
Create a new password broker instance.
Send a password reset link to a user.
Validate a password reset for the given credentials.
Get the user for the given credentials.
Get the password reset token repository implementation.
Get the timebox instance used by the broker.
Details
at line 36
__construct(TokenRepositoryInterface $tokens, UserProvider $users, string $name, Dispatcher|null $events = null, Timebox|null $timebox = null, int $timeboxDuration = 200000)
Create a new password broker instance.
at line 51
string
sendResetLink(array $credentials, Closure|null $callback = null)
Send a password reset link to a user.
at line 99
mixed
reset(array $credentials, Closure $callback)
Reset the password for the given token.
at line 129
protected CanResetPassword|string
validateReset(array $credentials)
Validate a password reset for the given credentials.
at line 147
CanResetPassword|null
getUser(array $credentials)
Get the user for the given credentials.
at line 163
string
createToken(CanResetPassword $user)
Create a new password reset token for the given user.
at line 171
void
deleteToken(CanResetPassword $user)
Delete password reset tokens of the given user.
at line 179
bool
tokenExists(CanResetPassword $user, string $token)
Validate the given password reset token.
at line 187
TokenRepositoryInterface
getRepository()
Get the password reset token repository implementation.
at line 195
Timebox
getTimebox()
Get the timebox instance used by the broker.
at line 206
void
setDispatcher(Dispatcher $events)
Set the event dispatcher instance.
Boot or tests only. The dispatcher is stored on the worker-lifetime broker and affects every subsequent password reset-link event.