class

LavinMQ::Auth::JWT::JWKSFetcher

Inherits Reference < Object

Fetches JWKS (JSON Web Key Set) from OAuth provider. Handles OIDC discovery and JWKS parsing.

Constants

Log = LavinMQ::Log.for("jwks_fetcher")
ON_DEMAND_FETCH_COOLDOWN = 30.seconds

Minimum time between failed on-demand fetch attempts, so an unreachable provider doesn't delay every authentication.

Constructors

new(issuer_url : URI, default_cache_ttl : Time::Span)
Source

Instance methods

cleanup
Source
ensure_keys

Fetches the JWKS when no fetch has succeeded yet (e.g. verification racing the initial background fetch), blocking until keys are available. No-op once keys exist; never raises. Failed attempts are retried at most every ON_DEMAND_FETCH_COOLDOWN.

Source
fetch_jwks
Source
fetch_oidc_config
Source
oidc_config
Source
public_keys
Source
start_refresh_loop(retry_delay initial_retry_delay = 5.seconds)
Source

Nested types