CacheTokenRepository
class CacheTokenRepository implements TokenRepositoryInterface (View source)
Properties
protected | $format | The format of the stored Carbon object. |
Methods
__construct(Repository $cache, Hasher $hasher, string $hashKey, int $expires = 3600, int $throttle = 60, string $prefix = '')
Create a new token repository instance.
string
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.
Details
__construct(Repository $cache, Hasher $hasher, string $hashKey, int $expires = 3600, int $throttle = 60, string $prefix = '')
Create a new token repository instance.
string
create(CanResetPassword $user)
Create a new token.
bool
exists(CanResetPassword $user, string $token)
Determine if a token record exists and is valid.
protected 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.
protected bool
tokenRecentlyCreated(string $createdAt)
Determine if the token was recently created.
void
delete(CanResetPassword $user)
Delete a token record.
void
deleteExpired()
Delete expired tokens.