class Illuminate / Auth / Passwords / DatabaseTokenRepository

DatabaseTokenRepository

Implements

Properties

protected

$connection ConnectionInterface

The database connection instance.

Default: null
protected

$hasher Hasher

The Hasher implementation.

Default: null
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

public

create ( CanResetPassword $user ) : string

Create a new token record.

Parameters

protected

deleteExisting ( CanResetPassword $user ) : int

Delete all existing reset tokens from the database.

Parameters

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

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

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

public

deleteExpired ( ) : void

Delete expired tokens.

public

createNewToken ( ) : string

Create a new token for the user.

public

getConnection ( ) : ConnectionInterface

Get the database connection instance.

protected

getTable ( ) : Builder

Begin a new database query against the table.

public

getHasher ( ) : Hasher

Get the hasher instance.