@Override public void invoke(Request request, Response response) throws IOException, ServletException { String sessionId = request.getRequestedSessionId(); Session session = request.getContext().getManager().findSession(sessionId); if (session != null) { if (!session.isValid()) { session.expire(); request.getContext().getManager().remove(session); } else { manager.add(session); session.access(); session.endAccess(); } } try { getNext().invoke(request, response); } finally { manager.store(request.getSession(false)); } }
@Override public void invoke(Request request, Response response) throws IOException, ServletException { String sessionId = request.getRequestedSessionId(); Session session = request.getContext().getManager().findSession(sessionId); if (session != null) { if (!session.isValid()) { session.expire(); request.getContext().getManager().remove(session); } else { manager.add(session); session.access(); session.endAccess(); } } try { getNext().invoke(request, response); } finally { manager.store(request.getSession(false)); } }
@Override public void invoke(Request request, Response response) throws IOException, ServletException { String sessionId = request.getRequestedSessionId(); Session session = request.getContext().getManager().findSession(sessionId); if (session != null) { if (!session.isValid()) { session.expire(); request.getContext().getManager().remove(session); } else { manager.add(session); session.access(); session.endAccess(); } } try { getNext().invoke(request, response); } finally { manager.store(request.getSession(false)); } }
@Override public void invoke(Request request, Response response) throws IOException, ServletException { String sessionId = request.getRequestedSessionId(); Session session = request.getContext().getManager().findSession(sessionId); if (session != null) { if (!session.isValid()) { session.expire(); request.getContext().getManager().remove(session); } else { manager.add(session); session.access(); session.endAccess(); } } try { getNext().invoke(request, response); } finally { manager.store(request.getSession(false)); } }
@Override protected ModelAndView handleContext(String contextName, Context context, HttpServletRequest request, HttpServletResponse response) throws Exception { String sessionId = ServletRequestUtils.getStringParameter(request, "sid"); Session session = context.getManager().findSession(sessionId); if (session != null) { session.expire(); } return new ModelAndView(new InternalResourceView(getViewName())); }
@Override protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception { for (String sidWebApp : ServletRequestUtils.getStringParameters(request, "sid_webapp")) { if (sidWebApp != null) { String[] ss = sidWebApp.split(";"); if (ss.length == 2) { String sessionId = ss[0]; String appName = ss[1]; Context context = getContainerWrapper().getTomcatContainer().findContext(appName); if (context != null) { Manager manager = context.getManager(); Session session = manager.findSession(sessionId); if (session != null && session.isValid()) { session.expire(); } } else { return new ModelAndView("errors/paramerror"); } } else { return new ModelAndView("errors/paramerror"); } } } return new ModelAndView(new InternalResourceView(getViewName())); }
public void expireSession( String sessionId ) { Session s=(Session)sessions.get(sessionId); if( s==null ) { return; } s.expire(); }
protected void logoutSession(Session session) { try { if (session != null) session.expire(); } catch (Exception e) { log.debug("Session not present or already invalidated.", e); } }
protected void logoutSession(Session session) { try { if (session != null) session.expire(); } catch (Exception e) { log.debug("Session not present or already invalidated.", e); } }
public void expireSession( String sessionId ) { Session s=(Session)sessions.get(sessionId); if( s==null ) { if(log.isInfoEnabled()) log.info("Session not found " + sessionId); return; } s.expire(); }
public void expireSession( String sessionId ) { Session s=(Session)sessions.get(sessionId); if( s==null ) { if(log.isInfoEnabled()) log.info("Session not found " + sessionId); return; } s.expire(); }
/** * {@inheritDoc} */ public void expireSession(String sessionId) { Session session = findSession(sessionId); if (session != null) session.expire(); }
public void expireSession( String sessionId ) { Session s=sessions.get(sessionId); if( s==null ) { if(log.isInfoEnabled()) log.info("Session not found " + sessionId); return; } s.expire(); }
public void expireSession( String sessionId ) { Session s=sessions.get(sessionId); if( s==null ) { if(log.isInfoEnabled()) log.info("Session not found " + sessionId); return; } s.expire(); }
public void expireSession( String sessionId ) { Session s=sessions.get(sessionId); if( s==null ) { if(log.isInfoEnabled()) log.info("Session not found " + sessionId); return; } s.expire(); }
public void expireSession( String sessionId ) { Session s=sessions.get(sessionId); if( s==null ) { if(log.isInfoEnabled()) log.info("Session not found " + sessionId); return; } s.expire(); }
public void expireSession( String sessionId ) { Session s=sessions.get(sessionId); if( s==null ) { if(log.isInfoEnabled()) log.info("Session not found " + sessionId); return; } s.expire(); }
public void expireSession( String sessionId ) { Session s = sessions.get(sessionId); if (s == null) { if (log.isInfoEnabled()) { log.info(sm.getString("managerBase.sessionNotFound", sessionId)); } return; } s.expire(); }
public void logout() throws SecurityServiceException { HttpGraniteContext context = (HttpGraniteContext)GraniteContext.getCurrentInstance(); Session session = getSession(context.getRequest(), false); if (session != null && session.getPrincipal() != null) { session.setAuthType(null); session.setPrincipal(null); session.removeNote(Constants.SESS_USERNAME_NOTE); session.removeNote(Constants.SESS_PASSWORD_NOTE); endLogout(); session.expire(); } }
public void logout() throws SecurityServiceException { HttpGraniteContext context = (HttpGraniteContext)GraniteContext.getCurrentInstance(); Session session = getSession(context.getRequest(), false); if (session != null && session.getPrincipal() != null) { session.setAuthType(null); session.setPrincipal(null); session.removeNote(Constants.SESS_USERNAME_NOTE); session.removeNote(Constants.SESS_PASSWORD_NOTE); endLogout(); session.expire(); } }