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
  • Field Details

  • Constructor Details

    • DefaultJwkSetFetcher

      public DefaultJwkSetFetcher(JwksClient jwksClient)
  • Method Details

    • fetch

      @NonNull @SingleResult public @NonNull org.reactivestreams.Publisher<com.nimbusds.jose.jwk.JWKSet> fetch(@Nullable @Nullable String providerName, @Nullable @Nullable String url)
      Specified by:
      fetch in interface JwkSetFetcher<com.nimbusds.jose.jwk.JWKSet>
      Parameters:
      providerName - The jwks provider name
      url - The Jwks uri
      Returns:
      The Json Web Key Set representation or an empty optional if it could not be loaded
    • clearCache

      public void clearCache(@NonNull @NonNull String url)
      Specified by:
      clearCache in interface JwkSetFetcher<com.nimbusds.jose.jwk.JWKSet>
      Parameters:
      url - The Jwks uri Clears cache