@Override
    public boolean supports(final HttpServletRequest request, final RegisteredService registeredService,
                            final Authentication authentication, final Service service) {
        if (!getAuthenticationContextMappings().isEmpty() && registeredService instanceof SamlRegisteredService) {
            val response = HttpRequestUtils.getHttpServletResponseFromRequestAttributes();

            val context = contextProvider.getObject();
            val webContext = new JEEContext(request, response);
            val result = SamlIdPSessionManager.of(context.getOpenSamlConfigBean(),
                context.getSessionStore()).fetch(webContext, AuthnRequest.class);
            if (result.isPresent()) {
                val authnRequest = (AuthnRequest) result.get().getLeft();
                return authnRequest.getRequestedAuthnContext() != null
                    && authnRequest.getRequestedAuthnContext().getAuthnContextClassRefs() != null
                    && !authnRequest.getRequestedAuthnContext().getAuthnContextClassRefs().isEmpty();
            }
        }
        return false;
    }
This is {@link SamlIdPMultifactorAuthenticationTrigger}.

@author Misagh Moayyed
@since 6.4.0
support/cas-server-support-saml-idp-web/src/main/java/org/apereo/cas/support/saml/web/idp/web/SamlIdPMultifactorAuthenticationTrigger.java