Module: Verikloak::MiddlewareJwksRefresh Private
- Included in:
- Middleware
- Defined in:
- lib/verikloak/middleware.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Internal mixin for discovery/JWKs lifecycle: initialization, throttled and forced revalidation, and rotation detection (key-set content identity). Extracted from Middleware to reduce class length and improve clarity.
Constant Summary collapse
- FORCED_REFRESH_MIN_INTERVAL =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Minimum seconds between failure-triggered (forced) JWKs revalidations. A token that fails against keys fetched less than this long ago would fail against an immediate re-fetch too, so skipping the round trip loses nothing — and it caps the upstream request rate an attacker can induce by flooding the middleware with unknown-
kidtokens. 5