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 Summary
Modifier and TypeFieldDescriptionstatic final boolean
The default expiration value.static final boolean
The default nonce value.static final boolean
The default not-before value.static final boolean
The default not-before value.static final boolean
The default subject-not-null value.static final String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription@Nullable String
@Nullable String
boolean
boolean
isNonce()
boolean
boolean
boolean
void
setAudience
(@Nullable String audience) void
setExpiration
(boolean expiration) void
void
setNonce
(boolean nonce) void
setNotBefore
(boolean notBefore) void
setOpenidIdtoken
(boolean openidIdtoken) void
setSubjectNotNull
(boolean subjectNotNull)
-
Field Details
-
PREFIX
- See Also:
-
DEFAULT_NONCE
public static final boolean DEFAULT_NONCEThe default nonce value.- See Also:
-
DEFAULT_EXPIRATION
public static final boolean DEFAULT_EXPIRATIONThe default expiration value.- See Also:
-
DEFAULT_SUBJECT_NOT_NULL
public static final boolean DEFAULT_SUBJECT_NOT_NULLThe default subject-not-null value.- See Also:
-
DEFAULT_NOT_BEFORE
public static final boolean DEFAULT_NOT_BEFOREThe default not-before value.- See Also:
-
DEFAULT_OPENID_ID_TOKEN
public static final boolean DEFAULT_OPENID_ID_TOKENThe default not-before value.- See Also:
-
-
Constructor Details
-
JwtClaimsValidatorConfigurationProperties
public JwtClaimsValidatorConfigurationProperties()
-
-
Method Details
-
getIssuer
- Specified by:
getIssuer
in interfaceJwtClaimsValidatorConfiguration
- Returns:
- Whether the iss claim should be validated to ensure it matches this value.
-
setIssuer
- 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
- Specified by:
getAudience
in interfaceJwtClaimsValidatorConfiguration
- Returns:
- Whether the aud claim should be validated to ensure it matches this value.
-
setAudience
- 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 interfaceJwtClaimsValidatorConfiguration
- 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 interfaceJwtClaimsValidatorConfiguration
- 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 interfaceJwtClaimsValidatorConfiguration
- 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 interfaceJwtClaimsValidatorConfiguration
- 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 interfaceJwtClaimsValidatorConfiguration
- 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.
-