/** * Perform pre-validation on the Signature token. * * @param signature the signature to evaluate * @param metadataEntryName the EntityDescriptor entityID, EntitiesDescriptor Name, * AffiliationDescriptor affiliationOwnerID, * or RoleDescriptor {@link #getRoleIDToken(String, RoleDescriptor)} * corresponding to the element whose signature is being evaluated. * This is used exclusively for logging/debugging purposes and * should not be used operationally (e.g. for building a criteria set). * @throws FilterException thrown if the signature element fails pre-validation */ protected void performPreValidation(Signature signature, String metadataEntryName) throws FilterException { if (getSignaturePrevalidator() != null) { try { getSignaturePrevalidator().validate(signature); } catch (ValidationException e) { log.error("Signature on metadata entry '{}' failed signature pre-validation", metadataEntryName); throw new FilterException("Metadata instance signature failed signature pre-validation", e); } } }