Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SignatureInvalidException not available on line 150 in JWT.php #588

Open
tbobker123 opened this issue Dec 13, 2024 · 2 comments
Open

SignatureInvalidException not available on line 150 in JWT.php #588

tbobker123 opened this issue Dec 13, 2024 · 2 comments

Comments

@tbobker123
Copy link

tbobker123 commented Dec 13, 2024

When passing an invalid token, I am getting a PHP error. The current line is:

        if (!self::verify("{$headb64}.{$bodyb64}", $sig, $key->getKeyMaterial(), $header->alg)) {
            throw new SignatureInvalidException('Signature verification failed');
        }

But as far as I can see, SignatureInvalidException is not available in this file I updated to use the included UnexpectedValueException.

Please let me know if I have this wrong or if there really is some code error.

@Krisell
Copy link

Krisell commented Dec 13, 2024

The SignatureInvalidException class does exist in the same folder and namespace. What is the exact error you are seeing?

@tbobker123
Copy link
Author

I get this error in my log:

PHP Fatal error: Uncaught Error: Class "Firebase\JWT\SignatureInvalidException" not found in /var/www/..../includes/php-jwt-main/src/JWT.php:150

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants