-
Notifications
You must be signed in to change notification settings - Fork 108
Support Cached key set #535
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
Conversation
8c6aca1
to
ff44a42
Compare
This needs to be rebased. |
Yes, Happy to do that once #507 is merged / decided and 2.x-next Up to date or 3.x ist existing |
Merged 2.x into 2.next. |
done - it's still containing the commit of #507 |
use Psr\Http\Message\ServerRequestInterface; | ||
use RuntimeException; | ||
use stdClass; | ||
use Symfony\Component\Cache\Adapter\Psr16Adapter; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need this Symfony adapter? Cake's cache engine are already PSR16 compliant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, php-jwt opted for PSR-6 based Cache. Psr16Adapter returns a PSR6 Cache.
See https://symfony.com/doc/current/components/cache/psr6_psr16_adapters.html#using-a-psr-16-cache-object-as-a-psr-6-cache
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we write our own adapter instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The cake cache adapters already implement the PSR16 interfaces. We could implement a 6 to 16 adapter in cake to avoid adding another medium sized dependency.
This pull request is stale because it has been open 30 days with no activity. Remove the |
This is meant to gather your thoughts on support for cachedKeySets.
Instead of providing an array with keys to jwks and URL could be passed which is then fetched and cached by php-jwt.
Configuration options still TBD.
This functionality has been added to php-jwt in 6.2: firebase/php-jwt#397
The revelant change would be among these lines: https://github.com/cakephp/authentication/pull/535/files#diff-ace0e7f81ad6600f2a672e7393458f22cc0f8c44e69bd76ef9be077e677c14fbR158