DatabaseTokenRepository
class DatabaseTokenRepository implements TokenRepositoryInterface
Methods
Create a new token repository instance.
Build the record payload for the table.
Determine if the token has expired.
Determine if the given user recently created a password reset token.
Determine if the token was recently created.
Delete expired tokens.
Create a new token for the user.
Get the database connection instance.
Details
at line 23
__construct(ConnectionInterface $connection, Hasher $hasher, string $table, string $hashKey, int $expires = 3600, int $throttle = 60)
Create a new token repository instance.
at line 36
string
create(CanResetPassword $user)
Create a new token record.
at line 55
protected int
deleteExisting(CanResetPassword $user)
Delete all existing reset tokens from the database.
at line 63
protected array
getPayload(string $email, string $token)
Build the record payload for the table.
at line 71
bool
exists(CanResetPassword $user, string $token)
Determine if a token record exists and is valid.
at line 86
protected bool
tokenExpired(string $createdAt)
Determine if the token has expired.
at line 94
bool
recentlyCreatedToken(CanResetPassword $user)
Determine if the given user recently created a password reset token.
at line 107
protected bool
tokenRecentlyCreated(string $createdAt)
Determine if the token was recently created.
at line 121
void
delete(CanResetPassword $user)
Delete a token record by user.
at line 129
void
deleteExpired()
Delete expired tokens.
at line 139
string
createNewToken()
Create a new token for the user.
at line 147
ConnectionInterface
getConnection()
Get the database connection instance.
at line 155
protected Builder
getTable()
Begin a new database query against the table.
at line 163
Hasher
getHasher()
Get the hasher instance.