Class SecretSignatureConfiguration

java.lang.Object
io.micronaut.security.token.jwt.signature.secret.SecretSignatureConfiguration

@EachProperty("micronaut.security.token.jwt.signatures.secret") @Context public class SecretSignatureConfiguration extends Object
Create a ConfigurationProperties bean for each sub-property of micronaut.security.token.jwt.signatures.secret.*.
Since:
1.0
Author:
Sergio del Amo
  • Constructor Details

    • SecretSignatureConfiguration

      public SecretSignatureConfiguration(@Parameter String name)
      Parameters:
      name - Bean's qualifier name
  • Method Details

    • getJwsAlgorithm

      public com.nimbusds.jose.JWSAlgorithm getJwsAlgorithm()
      Returns:
      The JWS Algorithm
    • setJwsAlgorithm

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

      @NotNull public @NotNull String getSecret()
      Returns:
      Secret's length must be at least 256 bits. it is used to sign JWT.
    • setSecret

      public void setSecret(String secret)
      Secret used to sign JWT. Length must be at least 256 bits.
      Parameters:
      secret - Signature Secret
    • getName

      public String getName()
      Returns:
      Bean's qualifier name
    • isBase64

      public boolean isBase64()
      Returns:
      true if the secret is Base64 encoded
    • setBase64

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