Hi,

Thanks for your quick reply!
Is it something that it’s going to be implemented? Is there any alternative with the rest API that you offer?

Thanks again,
Jason

On Oct 13, 2014, at 2:44 PM, Jason Rodis <jasrodis@gmail.com> wrote:

Good morning,

I am trying to set up an application that uses:

1. Spring 3.2.x

I used to have spring security for the authentication of the users, and I could have a logout listener, triggering the SessionDestroyedEvent like this (whenever a session was destroyed) :

@Service
public class LogoutListener implements ApplicationListener<SessionDestroyedEvent> {

    @Autowired
    private SessionRegistryImpl sessionRegistry;

    @Override
    public void onApplicationEvent(SessionDestroyedEvent event) {
        List<SecurityContext> lstSecurityContext = event.getSecurityContexts();
        AuthenticateUser authenticateUser;
        for (SecurityContext securityContext : lstSecurityContext) {
            authenticateUser = (AuthenticateUser) securityContext.getAuthentication().getPrincipal();
            logger.trace("Current session destroyed from user [{}]", authenticateUser.getEmail());


            //Handle the session destruction event..

        }
    }
}


Is there any way I could have that functionality with Keycloak?

Thanks in advance,
Jason