jwkRateLimit

fun jwkRateLimit(bucketSize: Long = 10, refillDuration: Duration = 1.minutes)(source)

Configures rate limiting for JWKS endpoint requests.

Exhausting the bucket fails the request with OidcSigningKeyUnavailableException rather than rejecting the token, so size it for peak cache-miss traffic.

Report a problem

Parameters

bucketSize

the maximum number of requests allowed in the time window, defaults to 10.

refillDuration

time window for the rate limit bucket, defaults to 1 minute.