This works with public keys?
kosciuk opened this issue · 2 comments
kosciuk commented
Hi, I was using oauth server from https://oauth2.thephpleague.com/installation/ with public and private keys, but using the public key as secret with file_get_contents didn't work.
tuupola commented
Is it uses rsa256 then you should be able to use something like:
$app = new Slim\App;
$app->add(new Tuupola\Middleware\JwtAuthentication([
"secret" => $publickey
"algorithm" => ["RS256"]
]));
You can find example of how to generate the token in firebase/php-jwt README. This middleware uses firebase/php-jwt for decoding the token.
kosciuk commented
It works! Thanks!
But I think I will continue with the oauth server