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

Using basic client example throws Fatal Error reading Key #352

Closed
xiscojb opened this issue Jan 3, 2023 · 1 comment
Closed

Using basic client example throws Fatal Error reading Key #352

xiscojb opened this issue Jan 3, 2023 · 1 comment

Comments

@xiscojb
Copy link

xiscojb commented Jan 3, 2023

Hello,

I am struggling trying to get the basic client working.

Fatal error: Uncaught phpseclib3\Exception\NoKeyLoadedException: Unable to read key in /var/www/html/website/htdocs/vendor/phpseclib/phpseclib/phpseclib/Crypt/PublicKeyLoader.php:63 Stack trace: #0 /var/www/html/website/htdocs/vendor/jumbojett/openid-connect-php/src/OpenIDConnectClient.php(1151): phpseclib3\Crypt\PublicKeyLoader::load() #1 /var/www/html/website/htdocs/vendor/jumbojett/openid-connect-php/src/OpenIDConnectClient.php(1251): Jumbojett\OpenIDConnectClient->verifyRSAJWTsignature() #2 /var/www/html/website/htdocs/vendor/jumbojett/openid-connect-php/src/OpenIDConnectClient.php(354): Jumbojett\OpenIDConnectClient->verifyJWTsignature() #3 /var/www/html/website/htdocs/index.php(23): Jumbojett\OpenIDConnectClient->authenticate() #4 {main} thrown in /var/www/html/website/htdocs/vendor/phpseclib/phpseclib/phpseclib/Crypt/PublicKeyLoader.php on line 63ader.php:63

Following the route of the exception, it seems that cant read the key for validating JWT signature. I feel that those keys are retrieved from de IDP via the network, and are the ones in the Realm Config --> Keys, so I should not bother to physically have them and imported in the client. (?¿)

I have not found anyone with this problem, so it may be something in my side, but any hint will be appreciated.

Regards,

Xisco.

@xiscojb
Copy link
Author

xiscojb commented Jan 3, 2023

The clue was on #313. Was using php 8.1 without php-xml.

Solved!!

@xiscojb xiscojb closed this as completed Jan 3, 2023
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

1 participant