Class JWTIdentifierClaimsValidator
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
net.shibboleth.oidc.jwt.claims.AbstractClaimsValidator
net.shibboleth.oidc.security.jwt.claims.impl.JWTIdentifierClaimsValidator
- All Implemented Interfaces:
ClaimsValidator,Component,DestructableComponent,IdentifiableComponent,IdentifiedComponent,InitializableComponent
Verifies the identifier (jit) from the JWT against replay via configurable
ReplayCache.
Single identifier is stored in the cache for the lifetime of the JWT (expiration instant is taken from the 'exp' -claim).
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate DurationClock skew adjustment in both directions to consider still acceptable (Default value: 1 minute).private ReplayCacheMessage replay cache instance to use. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected voiddoValidate(com.nimbusds.jwt.JWTClaimsSet claims, ProfileRequestContext context) Perform validation of the given claims supported by the supplied context.voidsetClockSkew(Duration skew) Set the clock skew.voidsetReplayCache(ReplayCache cache) Set the replay cache instance to use.Methods inherited from class net.shibboleth.oidc.jwt.claims.AbstractClaimsValidator
setActivationCondition, validateMethods inherited from class net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
setIdMethods inherited from class net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
ensureId, getId, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentExceptionMethods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, initialize, isDestroyed, isInitializedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.shibboleth.shared.component.IdentifiableComponent
setIdMethods inherited from interface net.shibboleth.shared.component.IdentifiedComponent
getId
-
Field Details
-
replayCache
Message replay cache instance to use. -
clockSkew
Clock skew adjustment in both directions to consider still acceptable (Default value: 1 minute).
-
-
Constructor Details
-
JWTIdentifierClaimsValidator
public JWTIdentifierClaimsValidator()Constructor.
-
-
Method Details
-
setReplayCache
Set the replay cache instance to use.- Parameters:
cache- replay cache to set.
-
setClockSkew
Set the clock skew.- Parameters:
skew- clock skew to set.
-
doInitialize
- Overrides:
doInitializein classAbstractIdentifiedInitializableComponent- Throws:
ComponentInitializationException
-
doValidate
protected void doValidate(@Nonnull com.nimbusds.jwt.JWTClaimsSet claims, @Nullable ProfileRequestContext context) throws JWTValidationException Perform validation of the given claims supported by the supplied context.- Specified by:
doValidatein classAbstractClaimsValidator- Parameters:
claims- the claims to validate.context- the profile request context.- Throws:
JWTValidationException- when validation is unsuccessful due to a failed attempt
-