miladrahimi/php-jwt

Wrong condition

Closed this issue · 1 comments

Exp must be newer than now

$this->addRule(PublicClaimNames::EXPIRATION_TIME, new NewerThan(time()));

but your NewerThan has incorrect behavior
return $exists && $this->number > $value;

Result: time() > exp, must be exp > time()

Thanks for your report.
The bug is fixed now, you can update the package with composer update.
https://github.com/miladrahimi/php-jwt/releases/tag/v1.1.4