@Introspected @Requires(property="micronaut.security.token.jwt.generator.refresh-token.secret") @Requires(property="micronaut.security.token.jwt.generator.refresh-token.enabled",notEquals="false") @ConfigurationProperties(value="micronaut.security.token.jwt.generator.refresh-token") public class RefreshTokenConfigurationProperties extends java.lang.Object implements RefreshTokenConfiguration
ConfigurationProperties
implementation of RefreshTokenConfiguration
to configure SignedRefreshTokenGenerator
.Modifier and Type | Field and Description |
---|---|
static boolean |
DEFAULT_BASE64
The default base64 value.
|
static boolean |
DEFAULT_ENABLED
The default enable value.
|
static com.nimbusds.jose.JWSAlgorithm |
DEFAULT_JWS_ALGORITHM
The default secure value.
|
static java.lang.String |
PREFIX |
Constructor and Description |
---|
RefreshTokenConfigurationProperties() |
Modifier and Type | Method and Description |
---|---|
com.nimbusds.jose.JWSAlgorithm |
getJwsAlgorithm() |
java.lang.String |
getSecret() |
boolean |
isBase64() |
boolean |
isEnabled() |
void |
setBase64(boolean base64)
Indicates whether the supplied secret is base64 encoded.
|
void |
setEnabled(boolean enabled)
Sets whether
SignedRefreshTokenGenerator is enabled. |
void |
setJwsAlgorithm(com.nimbusds.jose.JWSAlgorithm jwsAlgorithm)
JWSAlgorithm . |
void |
setSecret(java.lang.String secret) |
public static final java.lang.String PREFIX
public static final com.nimbusds.jose.JWSAlgorithm DEFAULT_JWS_ALGORITHM
public static final boolean DEFAULT_BASE64
public static final boolean DEFAULT_ENABLED
public void setEnabled(boolean enabled)
SignedRefreshTokenGenerator
is enabled. Default value (true).enabled
- True if it is enabledpublic void setJwsAlgorithm(@NonNull com.nimbusds.jose.JWSAlgorithm jwsAlgorithm)
JWSAlgorithm
. Defaults to HS256jwsAlgorithm
- JWS Algorithmpublic void setSecret(@NonNull java.lang.String secret)
secret
- shared secret. For HS256 must be at least 256 bits.public void setBase64(boolean base64)
base64
- boolean flag indicating whether the supplied secret is base64 encoded@NonNull public com.nimbusds.jose.JWSAlgorithm getJwsAlgorithm()
getJwsAlgorithm
in interface RefreshTokenConfiguration
@NonNull public java.lang.String getSecret()
getSecret
in interface RefreshTokenConfiguration
public boolean isBase64()
isBase64
in interface RefreshTokenConfiguration
public boolean isEnabled()
isEnabled
in interface io.micronaut.core.util.Toggleable