Package com.auth0.jwk
Class RateLimitedJwkProvider
java.lang.Object
com.auth0.jwk.RateLimitedJwkProvider
- All Implemented Interfaces:
JwkProvider
Jwk provider that limits the amount of Jwks to deliver in a given rate.
-
Constructor Summary
ConstructorDescriptionRateLimitedJwkProvider
(JwkProvider provider, com.auth0.jwk.Bucket bucket) Creates a new provider that will check the given Bucket if a jwks can be provided now. -
Method Summary
-
Constructor Details
-
RateLimitedJwkProvider
Creates a new provider that will check the given Bucket if a jwks can be provided now.- Parameters:
bucket
- bucket to limit the amount of jwk requested in a given amount of time.provider
- provider to use to request jwk when the bucket allows it.
-
-
Method Details
-
get
Description copied from interface:JwkProvider
Attempts to get a JWK using the Key ID value. Note that implementations are synchronous (blocking).- Specified by:
get
in interfaceJwkProvider
- Parameters:
keyId
- value of the kid found in a JWT- Returns:
- a JWK
- Throws:
SigningKeyNotFoundException
- if no jwk can be found using the given kidJwkException
-