protected void destroyApplicationContext(final List<SessionTerminationHandler> terminationHandlers,
                                             final RequestContext requestContext) {
        val terminationResults = terminationHandlers
            .stream()
            .map(processor -> processor.beforeSessionTermination(requestContext))
            .flatMap(List::stream)
            .toList();
        val request = WebUtils.getHttpServletRequestFromExternalWebflowContext(requestContext);
        val session = request.getSession(false);
        FunctionUtils.doIfNotNull(session, HttpSession::invalidate);
        terminationHandlers.forEach(processor -> processor.afterSessionTermination(terminationResults, requestContext));
    }
Parameter to indicate logout request is confirmed.
support/cas-server-support-actions-core/src/main/java/org/apereo/cas/web/flow/logout/TerminateSessionAction.java