@Override
    public boolean isParticipating(final SingleSignOnParticipationRequest ssoRequest) throws Throwable {
        val service = ssoRequest.getAttributeValue(Service.class.getName(), Service.class);
        val registeredService = ssoRequest.getAttributeValue(RegisteredService.class.getName(), RegisteredService.class);
        val authentication = ssoRequest.getAttributeValue(Authentication.class.getName(), Authentication.class);
        val request = ssoRequest.getHttpServletRequest()
            .orElseGet(() -> WebUtils.getHttpServletRequestFromExternalWebflowContext(ssoRequest.getRequestContext().orElseThrow()));
        val response = ssoRequest.getHttpServletResponse()
            .orElseGet(() -> WebUtils.getHttpServletResponseFromExternalWebflowContext(ssoRequest.getRequestContext().orElseThrow()));

        val authnRequest = ssoRequest.getAttributeValue(AuthnRequest.class.getName(), AuthnRequest.class);
        val initialResult = supports(ssoRequest) && Boolean.FALSE.equals(authnRequest.isForceAuthn());

        return FunctionUtils.doAndHandle(
            () -> resolveMultifactorAuthenticationTrigger(service, registeredService, authentication, request, response)
                .map(requestedContext -> {
                    LOGGER.trace("Validating authentication context for event [{}] and service [{}]", requestedContext.getId(), registeredService);
                    val result = authenticationContextValidator.validate(authentication,
                        requestedContext.getId(), Optional.ofNullable(registeredService));
                    val validatedProvider = result.getProvider();
                    return initialResult && result.isSuccess() && validatedProvider.isPresent()
                           && !registeredService.getMultifactorAuthenticationPolicy().isForceExecution();
                })
            .orElse(initialResult), throwable -> false).get();
    }
This is {@link SamlIdPSingleSignOnParticipationStrategy}.

@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/SamlIdPSingleSignOnParticipationStrategy.java