private List<SingleLogoutRequestContext> performLogoutForTicket(final SingleLogoutExecutionRequest context) {
        val ticketToBeLoggedOut = context.getTicketGrantingTicket();
        val streamServices = new LinkedHashMap<String, Service>();
        val services = ticketToBeLoggedOut.getServices();
        streamServices.putAll(services);
        streamServices.putAll(ticketToBeLoggedOut.getProxyGrantingTickets());
        val logoutServices = streamServices
            .entrySet()
            .stream()
            .filter(entry -> entry.getValue() instanceof WebApplicationService)
            .map(entry -> Pair.of(entry.getKey(), (WebApplicationService) entry.getValue())).toList();

        val sloHandlers = logoutExecutionPlan.getSingleLogoutServiceMessageHandlers();
        return logoutServices
            .stream()
            .map(entry -> sloHandlers
                .stream()
                .sorted(Comparator.comparing(SingleLogoutServiceMessageHandler::getOrder))
                .filter(handler -> handler.supports(context, entry.getValue()))
                .map(handler -> {
                    val service = entry.getValue();
                    LOGGER.trace("Handling single logout callback for [{}]", service.getId());
                    return handler.handle(service, entry.getKey(), context);
                })
                .flatMap(Collection::stream)
                .filter(Objects::nonNull)
                .collect(Collectors.toList()))
            .flatMap(Collection::stream)
            .filter(distinctByKey(SingleLogoutRequestContext::getService))
            .collect(Collectors.toList());
    }
This logout manager handles the Single Log Out process.

@author Jerome Leleu
@since 4.0.0
core/cas-server-core-logout-api/src/main/java/org/apereo/cas/logout/DefaultLogoutManager.java