code: protected static void buildSignatureValidationFilterIfNeeded(final SamlRegisteredService service,
                                                                   final List<MetadataFilter> metadataFilterList,
                                                                   final String metadataSignatureResource) throws Exception {
          val signatureValidationFilter = SamlUtils.buildSignatureValidationFilter(metadataSignatureResource);
          signatureValidationFilter.setRequireSignedRoot(service.isRequireSignedRoot());
          addSignatureValidationFilterIfNeeded(service, signatureValidationFilter, metadataFilterList);
      }
docs: Build signature validation filter if needed.
  
  @param service                   the service
  @param metadataFilterList        the metadata filter list
  @param metadataSignatureResource the metadata signature resource
  @throws Exception the exception