@Override
    public void handleCasRequestSingleLogoutEvent(final CasRequestSingleLogoutEvent event) {
        try {
            val ticket = event.getTicketGrantingTicket();
            LOGGER.debug("Performing single logout for expired ticket-granting ticket [{}]", ticket.getId());
            val request = SingleLogoutExecutionRequest.builder()
                .ticketGrantingTicket(ticket)
                .build();
            val results = logoutManager.performLogout(request);
            results.stream().filter(r -> r.getStatus() == LogoutRequestStatus.FAILURE)
                .forEach(r -> LOGGER.warn("Logout request for [{}] and [{}] has failed", r.getTicketId(), r.getLogoutUrl()));
        } catch (final Throwable e) {
            LoggingUtils.error(LOGGER, e);
        }
    }
This is {@link CasAuthenticationAuthenticationEventListener} that attempts to consume CAS events
upon various authentication events. Event data is persisted into a repository
via {@link CasEventRepository}.

@author Misagh Moayyed
@since 5.0.0
core/cas-server-core-events-api/src/main/java/org/apereo/cas/support/events/listener/CasAuthenticationAuthenticationEventListener.java