Expose per-provider cache_duration option#34
Merged
Conversation
Forwarded to the underlying library's `cacheDuration` constructor option; controls the TTL of the cached OIDC discovery document and JWKS. Default remains 86400 seconds (24h), matching the library default. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #34 +/- ##
===========================================
Coverage 100.00% 100.00%
- Complexity 57 58 +1
===========================================
Files 9 9
Lines 268 274 +6
===========================================
+ Hits 268 274 +6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
jekuaitk
approved these changes
May 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a per-provider
cache_duration(seconds) option that's forwarded to the underlying library'scacheDurationconstructor option. Controls the TTL of the cached OIDC discovery document and JWKS.Why
Surfaced during a recent verification of the cache flow: the library already caches the discovery document and JWKS via the bundle-supplied
cache.apppool (no per-request IdP calls), but the TTL was hard-coded to the library default of 24h with no way for bundle consumers to shorten it for tighter key-rotation windows or extend it for stable IdPs.Backward compatibility
Additive only. Defaults to
86400(matching the library default) so existing configurations behave identically. The option is forwarded only when set, and the bundle's default mirrors the library's.Test plan
task test— 47 tests pass (one new + two extended existing assertions)task analyze:php— phpstan max level, no errorstask lint— cleantask test:matrix— all 6 PHP × deps combinations green🤖 Generated with Claude Code