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 Summary
-
Method Summary
Modifier and TypeMethodDescriptioncom.nimbusds.jose.JWSAlgorithm
getName()
@NotNull String
boolean
isBase64()
void
setBase64
(boolean base64) Indicates whether the supplied secret is base64 encoded.void
setJwsAlgorithm
(com.nimbusds.jose.JWSAlgorithm jwsAlgorithm) JWSAlgorithm
.void
Secret used to sign JWT.
-
Constructor Details
-
SecretSignatureConfiguration
- 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
- Returns:
- Secret's length must be at least 256 bits. it is used to sign JWT.
-
setSecret
Secret used to sign JWT. Length must be at least 256 bits.- Parameters:
secret
- Signature Secret
-
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
-