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
FieldsModifier and TypeFieldDescriptionstatic final booleanThe default expiration value.static final booleanThe default nonce value.static final booleanThe default not-before value.static final booleanThe default not-before value.static final booleanThe default subject-not-null value.static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable String@Nullable StringbooleanbooleanisNonce()booleanbooleanbooleanvoidsetAudience(@Nullable String audience) voidsetExpiration(boolean expiration) voidvoidsetNonce(boolean nonce) voidsetNotBefore(boolean notBefore) voidsetOpenidIdtoken(boolean openidIdtoken) voidsetSubjectNotNull(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:
getIssuerin 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:
getAudiencein 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:
isSubjectNotNullin 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:
isNotBeforein 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:
isExpirationin 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:
isNoncein 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:
isOpenidIdtokenin 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.
-