private boolean isAuthnInstantValid(final SAML2MessageContext context, final Instant authnInstant) {
        var configContext = context.getConfigurationContext();
        var maximumAuthenticationLifetime = configContext.getMaximumAuthenticationLifetime();
        if (maximumAuthenticationLifetime <= 0) {
            logger.info("Maximum authentication lifetime is set to {} with authn-instant {}. "
                + "Authn-instant validation will be disabled.", maximumAuthenticationLifetime, authnInstant);
            return true;
        }
        return isDateValid(authnInstant, maximumAuthenticationLifetime);
    }
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