class
Illuminate
/
Auth
/
Passwords
/
DatabaseTokenRepository
You are viewing an older version of the documentation. For the latest, please visit master documentation.
DatabaseTokenRepository
Implements
Properties
protected
$table string
The token database table.
Default: null
protected
$hashKey string
The hashing key.
Default: null
protected
$expires int
The number of seconds a token should last.
Default: null
protected
$throttle int
Minimum number of seconds before re-redefining the token.
Default: null
Methods
public
__construct ( ConnectionInterface $connection , Hasher $hasher , $table , $hashKey , $expires , $throttle ) : void
Create a new token repository instance.
Parameters
- $connection ConnectionInterface
- $hasher Hasher
- $table string
- $hashKey string
- $expires int
- $throttle int
public
create ( CanResetPassword $user ) : string
Create a new token record.
Parameters
- $user CanResetPassword
protected
deleteExisting ( CanResetPassword $user ) : int
Delete all existing reset tokens from the database.
Parameters
- $user CanResetPassword
protected
getPayload ( $email , $token ) : array
Build the record payload for the table.
Parameters
- $email string
- $token string
public
exists ( CanResetPassword $user , $token ) : bool
Determine if a token record exists and is valid.
Parameters
- $user CanResetPassword
- $token string
protected
tokenExpired ( $createdAt ) : bool
Determine if the token has expired.
Parameters
- $createdAt string
public
recentlyCreatedToken ( CanResetPassword $user ) : bool
Determine if the given user recently created a password reset token.
Parameters
- $user CanResetPassword
protected
tokenRecentlyCreated ( $createdAt ) : bool
Determine if the token was recently created.
Parameters
- $createdAt string
public
delete ( CanResetPassword $user ) : void
Delete a token record by user.
Parameters
- $user CanResetPassword
public
deleteExpired ( ) : void
Delete expired tokens.
public
createNewToken ( ) : string
Create a new token for the user.