Class ExpiredException not found
I have been trying to fix this since quite a while now. After my token expires, I get this exception:
PHP Fatal error: Class 'ExpiredException' not found in C:\wamp...\php-jwt-master\src\JWT.php on line 119.
I tried adding the use statement to explicitly use the ExpiredException class, but it still gives me this error. I am trying to redirect the user by comparing the exp claim against the current time.
Have you included ExpiredException.php (which defines the ExpiredException class)?
sorry but am new to jwt, i get the same issue, i have the "ExpiredException" class but its empty, do i need to write an implementation for this ? this seems to be the case for all the other ...Exception.php files included
@sadranyi You do not need to write an implementation for this, but if you want you could. Do note that it extends the UnexpectedValueException class, so it's not required at all.
The error @rutwick is reporting hasn't anything to do with an 'empty class' either. PHP simply can't find the class at all. Make sure ExpiredException.php is included, like @psignoret noted.
As mentioined, this is an autoload error. The solution is to properly install this package with composer (and include vendor/autoload.php in this script, as documented in this package's README, or provide your own solution for loading the class files (NOT RECOMMENDED).