@Test public void testAttributeAddedForXUProgOnly() throws Exception { reset(mockUser); when(mockUser.hasVistaKey("XUPROG")).thenReturn(true); when(mockEnvironment.getProperty("session.timeoutSec", Integer.class)).thenReturn(6000); listener.attributeAdded(new HttpSessionBindingEvent(mockSession, HttpSessionSecurityContextRepository.SPRING_SECURITY_CONTEXT_KEY, mockSecurityContext)); assertThat(mockSession.getMaxInactiveInterval(), is(86400)); }
public void attributeAdded(HttpSessionBindingEvent event) { if (!event.getName().equals(HttpSessionSecurityContextRepository.SPRING_SECURITY_CONTEXT_KEY)) return; setTimeOut(event); }
UserTimeoutIntegrationSessionAttributeListener implements HttpSessionAttributeListener { public void attributeAdded(HttpSessionBindingEvent event) { if (!event.getName().equals(HttpSessionSecurityContextRepository.SPRING_SECURITY_CONTEXT_KEY)) return; setTimeOut(event); } }
UserTimeoutIntegrationSessionAttributeListener implements HttpSessionAttributeListener { public void attributeAdded(HttpSessionBindingEvent event) { if (!event.getName().equals(HttpSessionSecurityContextRepository.SPRING_SECURITY_CONTEXT_KEY)) return; setTimeOut(event); }  }
UserTimeoutIntegrationSessionAttributeListener implements HttpSessionAttributeListener { public void attributeAdded(HttpSessionBindingEvent event) { if (!event.getName().equals(HttpSessionSecurityContextRepository.SPRING_SECURITY_CONTEXT_KEY)) return; setTimeOut(event); }  void attributeAdded(HttpSessionBindingEvent event); void attributeRemoved(HttpSessionBindingEvent event); void attributeReplaced(HttpSessionBindingEvent event); }
UserTimeoutIntegrationSessionAttributeListener implements HttpSessionAttributeListener { public void attributeAdded(HttpSessionBindingEvent event) { if (!event.getName().equals(HttpSessionSecurityContextRepository.SPRING_SECURITY_CONTEXT_KEY)) return; setTimeOut(event); }  void attributeAdded(HttpSessionBindingEvent event); void attributeRemoved(HttpSessionBindingEvent event); void attributeReplaced(HttpSessionBindingEvent event);  }