@Override
    public boolean isParticipating(final SingleSignOnParticipationRequest ssoRequest) {
        val registeredService = getRegisteredService(ssoRequest);
        if (registeredService == null) {
            return true;
        }
        val authenticationPolicy = registeredService.getAuthenticationPolicy();
        if (authenticationPolicy == null) {
            return true;
        }

        val ticketGrantingTicketId = getTicketGrantingTicketId(ssoRequest);
        if (ticketGrantingTicketId.isEmpty()) {
            return true;
        }

        val authentication = getTicketState(ssoRequest)
            .map(AuthenticationAwareTicket.class::cast)
            .map(AuthenticationAwareTicket::getAuthentication).orElseThrow();
        val successfulHandlerNames = CollectionUtils.toCollection(authentication.getAttributes()
            .get(AuthenticationHandler.SUCCESSFUL_AUTHENTICATION_HANDLERS));
        val assertedHandlers = authenticationEventExecutionPlan.resolveAuthenticationHandlers()
            .stream()
            .filter(handler -> successfulHandlerNames.contains(handler.getName()))
            .collect(Collectors.toSet());
        LOGGER.debug("Asserted authentication handlers are [{}]", assertedHandlers);
        val criteria = authenticationPolicy.getCriteria();
        return Optional.ofNullable(criteria)
            .map(Unchecked.function(cri -> {
                val policy = criteria.toAuthenticationPolicy(registeredService);
                val policyContext = Map.of(RegisteredService.class.getName(), registeredService);
                val result = policy.isSatisfiedBy(authentication, assertedHandlers, applicationContext, policyContext);
                return result.isSuccess();
            })).orElse(true);
    }
This is {@link RegisteredServiceAuthenticationPolicySingleSignOnParticipationStrategy}.

@author Misagh Moayyed
@since 6.2.0
core/cas-server-core-webflow-api/src/main/java/org/apereo/cas/web/flow/authentication/RegisteredServiceAuthenticationPolicySingleSignOnParticipationStrategy.java