DatabaseTokenRepository
class DatabaseTokenRepository implements TokenRepositoryInterface (View source)
Methods
__construct(ConnectionInterface $connection, Hasher $hasher, string $table, string $hashKey, int $expires = 3600, int $throttle = 60)
Create a new token repository instance.
string
int
array
getPayload(string $email, string $token)
Build the record payload for the table.
bool
bool
tokenExpired(string $createdAt)
Determine if the token has expired.
bool
recentlyCreatedToken(CanResetPassword $user)
Determine if the given user recently created a password reset token.
bool
tokenRecentlyCreated(string $createdAt)
Determine if the token was recently created.
void
void
deleteExpired()
Delete expired tokens.
string
createNewToken()
Create a new token for the user.
getConnection()
Get the database connection instance.
Details
__construct(ConnectionInterface $connection, Hasher $hasher, string $table, string $hashKey, int $expires = 3600, int $throttle = 60)
Create a new token repository instance.
protected int
deleteExisting(CanResetPassword $user)
Delete all existing reset tokens from the database.
bool
recentlyCreatedToken(CanResetPassword $user)
Determine if the given user recently created a password reset token.