private static CriteriaSet buildSignatureValidationFilterCriteria() {
        val criteriaSet = new CriteriaSet();

        val sigConfigs = new ArrayList<SignatureValidationConfiguration>();
        sigConfigs.add(SecurityConfigurationSupport.getGlobalSignatureValidationConfiguration());

        if (!sigConfigs.isEmpty()) {
            val paramsResolver = new BasicSignatureValidationParametersResolver();

            val configCriteria = new CriteriaSet(new SignatureValidationConfigurationCriterion(sigConfigs));
            val params = FunctionUtils.doUnchecked(() -> paramsResolver.resolveSingle(configCriteria));
            if (params != null) {
                criteriaSet.add(new SignatureValidationParametersCriterion(params), true);
            }
        }
        return criteriaSet;
    }
Build credential for metadata signature validation basic credential.

@param resource the resource
@return the basic credential
@throws Exception the exception
support/cas-server-support-saml-core-api/src/main/java/org/apereo/cas/support/saml/SamlUtils.java