Class DefaultJwkSetFetcher
java.lang.Object
io.micronaut.security.token.jwt.signature.jwks.DefaultJwkSetFetcher
- All Implemented Interfaces:
JwkSetFetcher<com.nimbusds.jose.jwk.JWKSet>
@Singleton
public class DefaultJwkSetFetcher
extends Object
implements JwkSetFetcher<com.nimbusds.jose.jwk.JWKSet>
Default implementation of
JwkSetFetcher for JWKSet.- Since:
- 3.9.0
- Author:
- Sergio del Amo
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAOT Optimizations. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefaultJwkSetFetcher(JwksClient jwksClient) Deprecated, for removal: This API element is subject to removal in a future version.DefaultJwkSetFetcher(JwksClient jwksClient, JwksClientConfiguration jwksClientConfiguration) -
Method Summary
Modifier and TypeMethodDescriptionvoidclearCache(@NonNull String url) Clears the cache for the given url, including the failure back-off of every provider using it, so that the JWK Set is requested again on the next fetch.@NonNull org.reactivestreams.Publisher<com.nimbusds.jose.jwk.JWKSet>
-
Field Details
-
OPTIMIZATIONS
-
-
Constructor Details
-
DefaultJwkSetFetcher
Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
jwksClient- JWKS Client
-
DefaultJwkSetFetcher
@Inject public DefaultJwkSetFetcher(JwksClient jwksClient, JwksClientConfiguration jwksClientConfiguration) - Parameters:
jwksClient- JWKS ClientjwksClientConfiguration- JWKS Client Configuration- Since:
- 5.5.2
-
-
Method Details
-
fetch
@SingleResult public @NonNull org.reactivestreams.Publisher<com.nimbusds.jose.jwk.JWKSet> fetch(@Nullable String providerName, @Nullable String url) - Specified by:
fetchin interfaceJwkSetFetcher<com.nimbusds.jose.jwk.JWKSet>- Parameters:
providerName- The jwks provider nameurl- The Jwks uri- Returns:
- The Json Web Key Set representation or an empty optional if it could not be loaded
-
clearCache
Clears the cache for the given url, including the failure back-off of every provider using it, so that the JWK Set is requested again on the next fetch.- Specified by:
clearCachein interfaceJwkSetFetcher<com.nimbusds.jose.jwk.JWKSet>- Parameters:
url- The Jwks uri
-
DefaultJwkSetFetcher(JwksClient, JwksClientConfiguration)instead.