@Override public void onApplicationEvent(SessionDestroyedEvent event) { logger.debug("onApplicationEvent"); if (event instanceof HttpSessionDestroyedEvent) { String sessionId = ((HttpSession) event.getSource()).getId(); removeSessionInformation(sessionId); } }
@Override @Transactional public void onApplicationEvent(SessionDestroyedEvent event) { List<SecurityContext> lstSecurityContext = event.getSecurityContexts(); UserDetails ud; for (SecurityContext securityContext : lstSecurityContext) { Authentication auth = securityContext.getAuthentication(); returnReceiptService.sendDepotStatusIfRequired(auth); } }
@Test public void springSessionDestroyedTranslatedToSpringSecurityDestroyed() { Session session = new MapSession(); this.publisher.publishEvent( new org.springframework.session.events.SessionDestroyedEvent(this, session)); assertThat(this.listener.getEvent().getId()).isEqualTo(session.getId()); }
public void onApplicationEvent(SessionDestroyedEvent event) { String sessionId = event.getId(); removeSessionInformation(sessionId); }
@Override public void onApplicationEvent(SessionDestroyedEvent event) { this.event = event; }
public SessionDestroyedEvent getEvent() { return this.event; }
@Override public void onApplicationEvent(SessionDestroyedEvent event) { logout(event.getId()); }