CacheTokenVerifier
in package
implements
TokenVerifierInterface
Tags
Table of Contents
Interfaces
Properties
- $cache : mixed
- $cacheKeyPrefix : string
- $outdatedTokenTtl : int
Methods
- __construct() : mixed
- updateExistingToken() : void
- Updates an existing token with a new token value and lastUsed time.
- verifyToken() : bool
- Verifies that the given $token is valid.
- getCacheKey() : string
Properties
$cache
private
mixed
$cache
$cacheKeyPrefix
private
string
$cacheKeyPrefix
$outdatedTokenTtl
private
int
$outdatedTokenTtl
Methods
__construct()
public
__construct(CacheItemPoolInterface $cache[, int $outdatedTokenTtl = 60 ][, string $cacheKeyPrefix = 'rememberme-stale-' ]) : mixed
Parameters
- $cache : CacheItemPoolInterface
- $outdatedTokenTtl : int = 60
-
How long the outdated token should still be considered valid. Defaults to 60, which matches how often the PersistentRememberMeHandler will at most refresh tokens. Increasing to more than that is not recommended, but you may use a lower value.
- $cacheKeyPrefix : string = 'rememberme-stale-'
updateExistingToken()
Updates an existing token with a new token value and lastUsed time.
public
updateExistingToken(PersistentTokenInterface $token, string $tokenValue, DateTimeInterface $lastUsed) : void
Parameters
- $token : PersistentTokenInterface
- $tokenValue : string
- $lastUsed : DateTimeInterface
verifyToken()
Verifies that the given $token is valid.
public
verifyToken(PersistentTokenInterface $token, string $tokenValue) : bool
Parameters
- $token : PersistentTokenInterface
- $tokenValue : string
Return values
boolgetCacheKey()
private
getCacheKey(PersistentTokenInterface $token) : string
Parameters
- $token : PersistentTokenInterface