@VisibleForTesting
    Boolean wantsAssertionsSigned(final SAML2MessageContext context) {
        var configContext = context.getConfigurationContext();
        val spDescriptor = context.getSPSSODescriptor();
        if (spDescriptor == null) {
            return configContext.isWantsAssertionsSigned();
        }
        return spDescriptor.getWantAssertionsSigned();
    }
Validate assertion signature. If none is found and the SAML response did not have one and the SP requires
the assertions to be signed, the validation fails.

@param signature the signature
@param context   the context
@param engine    the engine
pac4j-saml/src/main/java/org/pac4j/saml/sso/impl/SAML2AuthnResponseValidator.java