Interface JwksSignatureConfiguration

All Superinterfaces:
io.micronaut.core.naming.Named
All Known Implementing Classes:
JwksSignatureConfigurationProperties

public interface JwksSignatureConfiguration extends io.micronaut.core.naming.Named
JSON Web Key Set Configuration.
Since:
1.1.0
Author:
Sergio del Amo
  • Method Summary

    Modifier and Type
    Method
    Description
    @NonNull Integer
    Deprecated, for removal: This API element is subject to removal in a future version.
    Not used.
    default @Nullable String
    The issuer this JSON Web Key Set is bound to.
    @Nullable com.nimbusds.jose.jwk.KeyType
    Representation the KeyType for this JWKS signature configuration.
    @NonNull String
    Json Web Key Set endpoint url.

    Methods inherited from interface io.micronaut.core.naming.Named

    getName
  • Method Details

    • getUrl

      @NonNull String getUrl()
      Json Web Key Set endpoint url.
      Returns:
      returns a url where a JWKS is exposed.
    • getKeyType

      @Nullable com.nimbusds.jose.jwk.KeyType getKeyType()
      Representation the KeyType for this JWKS signature configuration. KeyType is the kty parameter in a JSON Web Key (JWK). When a key type is returned, only keys of that type are used to verify token signatures; a token signed with a key of another type is not verified, even if that key is part of the JWKS.
      Returns:
      The KeyType for the JWKS signature configuration, or null if keys of any type are matched.
    • getCacheExpiration

      @Deprecated(forRemoval=true, since="4.11.0") @NonNull Integer getCacheExpiration()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Not used. JWKS is cached via Micronaut Cache. You need an implementation of Micronaut Cache and the cache configuration micronaut.caches.jwks.expire-after-write
      Returns:
      The number of seconds to cache the JWKS.
    • getIssuer

      default @Nullable String getIssuer()
      The issuer this JSON Web Key Set is bound to. When an issuer is set, a token is only verified with this key set if its iss claim matches the issuer, even if its signature validates against one of the keys. This prevents a key trusted for one identity provider from signing tokens that claim to be issued by another provider.
      Returns:
      The issuer the key set is bound to, or null if tokens are verified regardless of their iss claim.
      Since:
      5.5.2