Class RequiredClaimsValidator
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.RequiredClaimsValidator
- All Implemented Interfaces:
ClaimsValidator,Component,DestructableComponent,IdentifiableComponent,IdentifiedComponent,InitializableComponent
Verify the claims set contains the given set of required claims.
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe names of the JWT claims that must be present, if empty no claims are required. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddoValidate(JWTClaimsSet claims, ProfileRequestContext context) Perform validation of the given claims supported by the supplied context.voidsetRequiredClaims(Collection<String> claims) Set the required claims.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
doInitialize, 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
-
requiredClaims
The names of the JWT claims that must be present, if empty no claims are required.
-
-
Constructor Details
-
RequiredClaimsValidator
public RequiredClaimsValidator()Constructor.
-
-
Method Details
-
setRequiredClaims
Set the required claims.- Parameters:
claims- the required claims.
-
doValidate
public void doValidate(@Nonnull JWTClaimsSet claims, @Nonnull 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
-