public boolean verifySamlProfileRequest(final RequestAbstractType profileRequest,
                                            final MetadataResolver resolver,
                                            final HttpServletRequest request,
                                            final MessageContext context) throws Throwable {

        val roleDescriptorResolver = getRoleDescriptorResolver(resolver, context, profileRequest);
        LOGGER.debug("Validating signature for [{}]", profileRequest.getClass().getName());

        val signature = profileRequest.getSignature();
        if (signature != null) {
            return validateSignatureOnProfileRequest(profileRequest, signature, roleDescriptorResolver);
        }
        return validateSignatureOnAuthenticationRequest(profileRequest, request, context, roleDescriptorResolver);
    }
Verify saml profile request if needed.

@param profileRequest the profile request
@param resolver       the resolver
@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