@Test void testHandleHttpSessionDestroyedEvent() { securityContextRegistry.handleHttpSessionDestroyedEvent( new HttpSessionDestroyedEvent(httpSessionWithSecurityContext)); }
@EventListener public void handleHttpSessionDestroyedEvent(HttpSessionDestroyedEvent httpSessionDestroyedEvent) { String sessionId = httpSessionDestroyedEvent.getId(); httpSessionMap.remove(sessionId); }
SecurityContextRegistryImpl implements SecurityContextRegistry { @EventListener public void handleHttpSessionDestroyedEvent(HttpSessionDestroyedEvent httpSessionDestroyedEvent) { String sessionId = httpSessionDestroyedEvent.getId(); httpSessionMap.remove(sessionId); } }
SecurityContextRegistryImpl implements SecurityContextRegistry { @EventListener public void handleHttpSessionDestroyedEvent(HttpSessionDestroyedEvent httpSessionDestroyedEvent) { String sessionId = httpSessionDestroyedEvent.getId(); httpSessionMap.remove(sessionId); } SecurityContextRegistryImpl(); }
SecurityContextRegistryImpl implements SecurityContextRegistry { @EventListener public void handleHttpSessionDestroyedEvent(HttpSessionDestroyedEvent httpSessionDestroyedEvent) { String sessionId = httpSessionDestroyedEvent.getId(); httpSessionMap.remove(sessionId); } SecurityContextRegistryImpl(); @Override SecurityContext getSecurityContext(String sessionId); @Override Stream<SecurityContext> getSecurityContexts(); @EventListener void handleHttpSessionCreatedEvent(HttpSessionCreatedEvent httpSessionCreatedEvent); @EventListener void handleHttpSessionDestroyedEvent(HttpSessionDestroyedEvent httpSessionDestroyedEvent); }
SecurityContextRegistryImpl implements SecurityContextRegistry { @EventListener public void handleHttpSessionDestroyedEvent(HttpSessionDestroyedEvent httpSessionDestroyedEvent) { String sessionId = httpSessionDestroyedEvent.getId(); httpSessionMap.remove(sessionId); } SecurityContextRegistryImpl(); @Override SecurityContext getSecurityContext(String sessionId); @Override Stream<SecurityContext> getSecurityContexts(); @EventListener void handleHttpSessionCreatedEvent(HttpSessionCreatedEvent httpSessionCreatedEvent); @EventListener void handleHttpSessionDestroyedEvent(HttpSessionDestroyedEvent httpSessionDestroyedEvent);  }