protected Event terminate(final RequestContext requestContext) {
        val request = WebUtils.getHttpServletRequestFromExternalWebflowContext(requestContext);
        val response = WebUtils.getHttpServletResponseFromExternalWebflowContext(requestContext);

        val applicationContext = requestContext.getActiveFlow().getApplicationContext();
        val terminationHandlers = BeanFactoryUtils.beansOfTypeIncludingAncestors(applicationContext, SessionTerminationHandler.class)
            .values()
            .stream()
            .filter(BeanSupplier::isNotProxy)
            .sorted(AnnotationAwareOrderComparator.INSTANCE)
            .toList();

        val ticketGrantingTicketId = getTicketGrantingTicket(requestContext);
        if (StringUtils.isNotBlank(ticketGrantingTicketId)) {
            LOGGER.trace("Destroying SSO session linked to ticket-granting ticket [{}]", ticketGrantingTicketId);
            terminationHandlers.forEach(processor -> processor.beforeSingleLogout(ticketGrantingTicketId, requestContext));

            val logoutRequests = initiateSingleLogout(ticketGrantingTicketId, request, response);
            WebUtils.putLogoutRequests(requestContext, logoutRequests);
        }
        LOGGER.trace("Removing CAS cookies");
        ticketGrantingTicketCookieGenerator.removeCookie(response);
        warnCookieGenerator.removeCookie(response);
        destroyApplicationContext(terminationHandlers, requestContext);
        LOGGER.debug("Terminated all CAS sessions successfully.");

        if (StringUtils.isNotBlank(logoutProperties.getRedirectUrl())) {
            WebUtils.putLogoutRedirectUrl(requestContext, logoutProperties.getRedirectUrl());
            return eventFactorySupport.event(this, CasWebflowConstants.STATE_ID_REDIRECT);
        }

        return eventFactorySupport.success(this);
    }
Parameter to indicate logout request is confirmed.
support/cas-server-support-actions-core/src/main/java/org/apereo/cas/web/flow/logout/TerminateSessionAction.java