Class JwksSignatureConfigurationProperties

java.lang.Object
io.micronaut.security.token.jwt.signature.jwks.JwksSignatureConfigurationProperties
All Implemented Interfaces:
io.micronaut.core.naming.Named, JwksSignatureConfiguration

@EachProperty("micronaut.security.token.jwt.signatures.jwks") public class JwksSignatureConfigurationProperties extends Object implements JwksSignatureConfiguration
JSON Web Key Set (JWKS) Signature Configuration properties holder.
Since:
1.1.0
Author:
Sergio del Amo
  • Field Details

    • PREFIX

      public static final String PREFIX
      See Also:
    • DEFAULT_KEYTYPE

      public static final com.nimbusds.jose.jwk.KeyType DEFAULT_KEYTYPE
      The default key type.
    • DEFAULT_CACHE_EXPIRATION

      public static final int DEFAULT_CACHE_EXPIRATION
      The default cache expiration.
      See Also:
  • Constructor Details

  • Method Details

    • getName

      @NonNull public @NonNull String getName()
      Specified by:
      getName in interface io.micronaut.core.naming.Named
    • getCacheExpiration

      @NonNull public @NonNull Integer getCacheExpiration()
      Specified by:
      getCacheExpiration in interface JwksSignatureConfiguration
      Returns:
      The number of seconds to cache the JWKS.
    • setCacheExpiration

      public void setCacheExpiration(Integer cacheExpiration)
      JWKS cache expiration. Default value 60 seconds.
      Parameters:
      cacheExpiration - The expiration
    • getUrl

      @NotNull @NonNull public @NotNull @NonNull String getUrl()
      Description copied from interface: JwksSignatureConfiguration
      Json Web Key Set endpoint url.
      Specified by:
      getUrl in interface JwksSignatureConfiguration
      Returns:
      URL to the remote JSON Web Key Set.
    • setUrl

      public void setUrl(String url)
      Remote JSON Web Key set url. e.g. https://.../.well-known/jwks.json
      Parameters:
      url - Remote JSON Web Key set url.
    • getKeyType

      @Nullable public @Nullable com.nimbusds.jose.jwk.KeyType getKeyType()
      Description copied from interface: JwksSignatureConfiguration
      Representation the KeyType for this JWKS signature configuration. KeyType is the kty parameter in a JSON Web Key (JWK).
      Specified by:
      getKeyType in interface JwksSignatureConfiguration
      Returns:
      Representation the KeyType for this JWKS signature configuration. KeyType is the kty parameter in a JSON Web Key (JWK).
    • setKeyType

      public void setKeyType(com.nimbusds.jose.jwk.KeyType keyType)
      Representation of the kty parameter in a JSON Web Key (JWK). Default value (RSA).
      Parameters:
      keyType - Representation of the kty parameter in a JSON Web Key (JWK).