TokenVerifierInterface
in
Tags
Table of Contents
Methods
- updateExistingToken() : void
- Updates an existing token with a new token value and lastUsed time.
- verifyToken() : bool
- Verifies that the given $token is valid.
Methods
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
This lets you override the token check logic to for example accept slightly outdated tokens.
Do not forget to implement token comparisons using hash_equals for a secure implementation.
Parameters
- $token : PersistentTokenInterface
- $tokenValue : string