-
Notifications
You must be signed in to change notification settings - Fork 212
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
Add signing key rotation and custom JWKS URI support #426
Conversation
6837b51
to
bf13bd8
Compare
bf13bd8
to
f557e67
Compare
dd2b886
to
6126574
Compare
$keys = $this->cache->get($cache_key); | ||
if (is_array($keys) && ! empty($keys)) { | ||
return $keys; | ||
$jwks_url = $jwks_url ?? $this->guzzleOptions['base_uri'] ?? ''; |
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.
It turns out there is a base_uri
setting in the HTTP library already so I'm leveraging that here. We need to know the final URI we're using here to check the cache (if necessary). I'm sticking with the "return empty array if URL is empty" because that is indicating "we don't have keys for that URL" and will fail with the "no kid found in that JWKS" error mentioned earlier. Same outcome for a malformed/empty JWKS.
@lbalmaceda - Ready for you again! |
Had to force merge, CodeCov was not completing. |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description
References
Closes #417, #426
PSR-16 cache interface
Testing
Checklist
master