Documentation

PasswordBroker
in package
implements PasswordBroker

Interfaces, Classes and Traits

PasswordBroker

Table of Contents

$passwordValidator  : Closure
The custom password validator callback.
$tokens  : TokenRepositoryInterface
The password token repository.
$users  : UserProvider
The user provider implementation.
__construct()  : void
Create a new password broker instance.
createToken()  : string
Create a new password reset token for the given user.
deleteToken()  : void
Delete password reset tokens of the given user.
getRepository()  : TokenRepositoryInterface
Get the password reset token repository implementation.
getUser()  : CanResetPassword|null
Get the user for the given credentials.
reset()  : mixed
Reset the password for the given token.
sendResetLink()  : string
Send a password reset link to a user.
tokenExists()  : bool
Validate the given password reset token.
validateNewPassword()  : bool
Determine if the passwords match for the request.
validator()  : void
Set a custom password validator.
validatePasswordWithDefaults()  : bool
Determine if the passwords are valid for the request.
validateReset()  : CanResetPassword|string
Validate a password reset for the given credentials.

Properties

$passwordValidator

The custom password validator callback.

protected Closure $passwordValidator

Methods

getUser()

Get the user for the given credentials.

public getUser(array<string|int, mixed> $credentials) : CanResetPassword|null
Parameters
$credentials : array<string|int, mixed>
Tags
throws
UnexpectedValueException
Return values
CanResetPassword|null

reset()

Reset the password for the given token.

public reset(array<string|int, mixed> $credentials, Closure $callback) : mixed
Parameters
$credentials : array<string|int, mixed>
$callback : Closure
Return values
mixed

Send a password reset link to a user.

public sendResetLink(array<string|int, mixed> $credentials) : string
Parameters
$credentials : array<string|int, mixed>
Return values
string

validateNewPassword()

Determine if the passwords match for the request.

public validateNewPassword(array<string|int, mixed> $credentials) : bool
Parameters
$credentials : array<string|int, mixed>
Return values
bool

validator()

Set a custom password validator.

public validator(Closure $callback) : void
Parameters
$callback : Closure
Return values
void

validatePasswordWithDefaults()

Determine if the passwords are valid for the request.

protected validatePasswordWithDefaults(array<string|int, mixed> $credentials) : bool
Parameters
$credentials : array<string|int, mixed>
Return values
bool

validateReset()

Validate a password reset for the given credentials.

protected validateReset(array<string|int, mixed> $credentials) : CanResetPassword|string
Parameters
$credentials : array<string|int, mixed>
Return values
CanResetPassword|string

Search results