private Set<Credential> getSigningCredential(final RoleDescriptorResolver resolver,
                                                 final RequestAbstractType profileRequest) {
        return FunctionUtils.doUnchecked(() -> {
            val kekCredentialResolver = new MetadataCredentialResolver();
            val config = getSignatureValidationConfiguration();
            kekCredentialResolver.setRoleDescriptorResolver(resolver);
            kekCredentialResolver.setKeyInfoCredentialResolver(
                DefaultSecurityConfigurationBootstrap.buildBasicInlineKeyInfoCredentialResolver());
            kekCredentialResolver.initialize();
            val criteriaSet = new CriteriaSet();
            criteriaSet.add(new SignatureValidationConfigurationCriterion(config));
            criteriaSet.add(new UsageCriterion(UsageType.SIGNING));

            buildEntityCriteriaForSigningCredential(profileRequest, criteriaSet);

            return Sets.newLinkedHashSet(kekCredentialResolver.resolve(criteriaSet));
        });

    }
Validate authn request signature.

@param profileRequest the authn request
@param adaptor        the adaptor
@param request        the request
@param context        the context
@return true or false
@throws Throwable the throwable
support/cas-server-support-saml-idp-web/src/main/java/org/apereo/cas/support/saml/web/idp/profile/builders/enc/validate/SamlObjectSignatureValidator.java