Class RefreshTokenConfigurationProperties

java.lang.Object
io.micronaut.security.token.jwt.generator.RefreshTokenConfigurationProperties
All Implemented Interfaces:
io.micronaut.core.util.Toggleable, RefreshTokenConfiguration

@Introspected @Requires(property="micronaut.security.token.jwt.generator.refresh-token.secret") @Requires(property="micronaut.security.token.jwt.generator.refresh-token.enabled",notEquals="false") @ConfigurationProperties("micronaut.security.token.jwt.generator.refresh-token") public class RefreshTokenConfigurationProperties extends Object implements RefreshTokenConfiguration
ConfigurationProperties implementation of RefreshTokenConfiguration to configure SignedRefreshTokenGenerator.
Since:
2.0.0
Author:
James Kleeh, Sergio del Amo
  • Field Details

    • PREFIX

      public static final String PREFIX
      See Also:
    • DEFAULT_JWS_ALGORITHM

      public static final com.nimbusds.jose.JWSAlgorithm DEFAULT_JWS_ALGORITHM
      The default secure value.
    • DEFAULT_BASE64

      public static final boolean DEFAULT_BASE64
      The default base64 value.
      See Also:
    • DEFAULT_ENABLED

      public static final boolean DEFAULT_ENABLED
      The default enable value.
      See Also:
  • Constructor Details

    • RefreshTokenConfigurationProperties

      public RefreshTokenConfigurationProperties()
  • Method Details

    • setEnabled

      public void setEnabled(boolean enabled)
      Sets whether SignedRefreshTokenGenerator is enabled. Default value (true).
      Parameters:
      enabled - True if it is enabled
    • setJwsAlgorithm

      public void setJwsAlgorithm(@NonNull @NonNull com.nimbusds.jose.JWSAlgorithm jwsAlgorithm)
      JWSAlgorithm. Defaults to HS256
      Parameters:
      jwsAlgorithm - JWS Algorithm
    • setSecret

      public void setSecret(@NonNull @NonNull String secret)
      Parameters:
      secret - shared secret. For HS256 must be at least 256 bits.
    • setBase64

      public void setBase64(boolean base64)
      Indicates whether the supplied secret is base64 encoded. Default value false.
      Parameters:
      base64 - boolean flag indicating whether the supplied secret is base64 encoded
    • getJwsAlgorithm

      @NonNull public @NonNull com.nimbusds.jose.JWSAlgorithm getJwsAlgorithm()
      Specified by:
      getJwsAlgorithm in interface RefreshTokenConfiguration
      Returns:
      JWS Algorithm
    • getSecret

      @NonNull public @NonNull String getSecret()
      Specified by:
      getSecret in interface RefreshTokenConfiguration
      Returns:
      Secret used to sign the refresh token.
    • isBase64

      public boolean isBase64()
      Specified by:
      isBase64 in interface RefreshTokenConfiguration
      Returns:
      true if the secret is Base64 encoded
    • isEnabled

      public boolean isEnabled()
      Specified by:
      isEnabled in interface io.micronaut.core.util.Toggleable