-
-
Notifications
You must be signed in to change notification settings - Fork 617
Open
Description
When I enable the allow_no_expiration option and test for an expired token, I get the following error:
{
"code": 401,
"message": "Invalid JWT Token"
}
This message is throw by this test
LexikJWTAuthenticationBundle/Encoder/LcobucciJWTEncoder.php
Lines 60 to 62 in 02ea57f
| if (!$jws->isVerified()) { | |
| throw new JWTDecodeFailureException(JWTDecodeFailureException::UNVERIFIED_TOKEN, 'Unable to verify the given JWT through the given configuration. If the "lexik_jwt_authentication.encoder" encryption options have been changed since your last authentication, please renew the token. If the problem persists, verify that the configured keys/passphrase are valid.', null, $jws->getPayload()); | |
| } |
And $jws->isVerified() use the timestamp for check the validity
LexikJWTAuthenticationBundle/Services/JWSProvider/LcobucciJWSProvider.php
Lines 169 to 173 in 02ea57f
| $isValid = $validator->validate( | |
| $jwt, | |
| new LooseValidAt($this->clock, new \DateInterval("PT{$this->clockSkew}S")), | |
| new SignedWith($this->signer, $key) | |
| ); |
My configuration
lexik_jwt_authentication:
secret_key: '%env(resolve:JWT_SECRET_KEY)%'
public_key: '%env(resolve:JWT_PUBLIC_KEY)%'
pass_phrase: '%env(JWT_PASSPHRASE)%'
allow_no_expiration: true
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels