Class JwtClaimsValidatorConfigurationProperties

java.lang.Object
io.micronaut.security.token.jwt.validator.JwtClaimsValidatorConfigurationProperties
All Implemented Interfaces:
JwtClaimsValidatorConfiguration

@ConfigurationProperties("micronaut.security.token.jwt.claims-validators") public class JwtClaimsValidatorConfigurationProperties extends Object implements JwtClaimsValidatorConfiguration
ConfigurationProperties implementation of JwtClaimsValidatorConfiguration.
Since:
2.4.0
Author:
Sergio del Amo
  • Field Details

    • PREFIX

      public static final String PREFIX
      See Also:
    • DEFAULT_NONCE

      public static final boolean DEFAULT_NONCE
      The default nonce value.
      See Also:
    • DEFAULT_EXPIRATION

      public static final boolean DEFAULT_EXPIRATION
      The default expiration value.
      See Also:
    • DEFAULT_SUBJECT_NOT_NULL

      public static final boolean DEFAULT_SUBJECT_NOT_NULL
      The default subject-not-null value.
      See Also:
    • DEFAULT_NOT_BEFORE

      public static final boolean DEFAULT_NOT_BEFORE
      The default not-before value.
      See Also:
    • DEFAULT_OPENID_ID_TOKEN

      public static final boolean DEFAULT_OPENID_ID_TOKEN
      The default not-before value.
      See Also:
  • Constructor Details

    • JwtClaimsValidatorConfigurationProperties

      public JwtClaimsValidatorConfigurationProperties()
  • Method Details

    • getIssuer

      @Nullable public @Nullable String getIssuer()
      Specified by:
      getIssuer in interface JwtClaimsValidatorConfiguration
      Returns:
      Whether the iss claim should be validated to ensure it matches this value.
    • setIssuer

      public void setIssuer(@Nullable @Nullable String issuer)
      Parameters:
      issuer - Whether the iss claim should be validated to ensure it matches this value. It defaults to null, thus it is not validated.
    • getAudience

      @Nullable public @Nullable String getAudience()
      Specified by:
      getAudience in interface JwtClaimsValidatorConfiguration
      Returns:
      Whether the aud claim should be validated to ensure it matches this value.
    • setAudience

      public void setAudience(@Nullable @Nullable String audience)
      Parameters:
      audience - Whether the aud claim should be validated to ensure it matches this value. It defaults to null, thus it is not validated.
    • isSubjectNotNull

      public boolean isSubjectNotNull()
      Specified by:
      isSubjectNotNull in interface JwtClaimsValidatorConfiguration
      Returns:
      Whether the JWT subject claim should be validated to ensure it is not null.
    • setSubjectNotNull

      public void setSubjectNotNull(boolean subjectNotNull)
      Parameters:
      subjectNotNull - Whether the JWT subject claim should be validated to ensure it is not null. Default value true.
    • isNotBefore

      public boolean isNotBefore()
      Specified by:
      isNotBefore in interface JwtClaimsValidatorConfiguration
      Returns:
      Whether it should be validated that validation time is not before the not-before claim (nbf) of a JWT token.
    • setNotBefore

      public void setNotBefore(boolean notBefore)
      Parameters:
      notBefore - Whether it should be validated that validation time is not before the not-before claim (nbf) of a JWT token. Default value false.
    • isExpiration

      public boolean isExpiration()
      Specified by:
      isExpiration in interface JwtClaimsValidatorConfiguration
      Returns:
      Whether the expiration date of the JWT should be validated.
    • setExpiration

      public void setExpiration(boolean expiration)
      Parameters:
      expiration - Whether the expiration date of the JWT should be validated. Default value true.
    • isNonce

      public boolean isNonce()
      Specified by:
      isNonce in interface JwtClaimsValidatorConfiguration
      Returns:
      Whether the nonce claim should be validated when a nonce was present.
    • setNonce

      public void setNonce(boolean nonce)
      Parameters:
      nonce - Whether the nonce claim should be validated when a nonce was present. Default value true.
    • isOpenidIdtoken

      public boolean isOpenidIdtoken()
      Specified by:
      isOpenidIdtoken in interface JwtClaimsValidatorConfiguration
      Returns:
      Whether `IdTokenClaimsValidator`, which performs some fo the verifications described in OpenID Connect Spec, is enabled. Only applies for `idtoken` authentication mode.
    • setOpenidIdtoken

      public void setOpenidIdtoken(boolean openidIdtoken)
      Parameters:
      openidIdtoken - Whether `IdTokenClaimsValidator`, which performs some fo the verifications described in OpenID Connect Spec, is enabled. Default value true. Only applies for `idtoken` authentication mode.