private void removeSsoSessionsForSessionIndexes(final HttpServletRequest request,
                                                    final HttpServletResponse response,
                                                    final LogoutRequest logoutRequest) {
        logoutRequest.getSessionIndexes().forEach(sessionIndex -> ticketRegistry
            .getSessionsWithAttributes(Map.of("sessionindex", List.of(Objects.requireNonNull(sessionIndex.getValue()))))
            .filter(ticket -> !ticket.isExpired())
            .map(TicketGrantingTicket.class::cast)
            .findFirst()
            .ifPresent(ticket -> singleLogoutRequestExecutor.execute(ticket.getId(), request, response)));
    }
This is {@link DelegatedSaml2ClientLogoutAction}.
<p>
The action takes into account the currently used PAC4J client which is stored
in the user profile. If the client is found, its logout action is executed.
<p>
Assumption: The PAC4J user profile should be in the user session during
logout, accessible with PAC4J Profile Manager. The Logout web flow should
make sure the user profile is present.

@author Misagh Moayyed
@since 5.1.0
support/cas-server-support-pac4j-saml/src/main/java/org/apereo/cas/web/flow/actions/logout/DelegatedSaml2ClientLogoutAction.java