s.setAttribute(Session.SESSION_CREATED_SECURE, Boolean.TRUE); if (s.isIdChanged() && (response instanceof Response)) ((Response)response).addCookie(s.getSessionHandler().getSessionCookie(s, request.getContextPath(), request.isSecure())); if (LOG.isDebugEnabled()) LOG.debug("renew {}->{}", oldId, s.getId());
public HttpSession getSession(boolean create) { if (_session != null) { if (_sessionManager != null && !_sessionManager.isValid(_session)) _session = null; else return _session; } if (!create) return null; if (_sessionManager == null) throw new IllegalStateException("No SessionManager"); _session = _sessionManager.newHttpSession(this); HttpCookie cookie = _sessionManager.getSessionCookie(_session,getContextPath(),isSecure()); if (cookie != null) _connection.getResponse().addCookie(cookie); return _session; }
@Override public HttpSession getSession(boolean create) { if (_session != null) { if (_sessionManager != null && !_sessionManager.isValid(_session)) _session = null; else return _session; } if (!create) return null; if (_sessionManager == null) throw new IllegalStateException("No SessionManager"); _session = _sessionManager.newHttpSession(this); HttpCookie cookie = _sessionManager.getSessionCookie(_session,getContextPath(),isSecure()); if (cookie != null) _channel.getResponse().addCookie(cookie); return _session; }
@Override public HttpSession getSession(boolean create) { if (_session != null) { if (_sessionManager != null && !_sessionManager.isValid(_session)) _session = null; else return _session; } if (!create) return null; if (_sessionManager == null) throw new IllegalStateException("No SessionManager"); _session = _sessionManager.newHttpSession(this); HttpCookie cookie = _sessionManager.getSessionCookie(_session,getContextPath(),isSecure()); if (cookie != null) _channel.getResponse().addCookie(cookie); return _session; }
public HttpSession getSession(boolean create) { if (_session != null) { if (_sessionManager != null && !_sessionManager.isValid(_session)) _session = null; else return _session; } if (!create) return null; if (_sessionManager == null) throw new IllegalStateException("No SessionManager"); _session = _sessionManager.newHttpSession(this); HttpCookie cookie = _sessionManager.getSessionCookie(_session,getContextPath(),isSecure()); if (cookie != null) _connection.getResponse().addCookie(cookie); return _session; }
public String changeSessionId() { HttpSession session = getSession(false); if (session == null) throw new IllegalStateException("No session"); if (session instanceof AbstractSession) { AbstractSession abstractSession = ((AbstractSession)session); abstractSession.renewId(this); if (getRemoteUser() != null) abstractSession.setAttribute(AbstractSession.SESSION_KNOWN_ONLY_TO_AUTHENTICATED, Boolean.TRUE); if (abstractSession.isIdChanged()) _channel.getResponse().addCookie(_sessionManager.getSessionCookie(abstractSession, getContextPath(), isSecure())); } return session.getId(); }
public String changeSessionId() { HttpSession session = getSession(false); if (session == null) throw new IllegalStateException("No session"); if (session instanceof AbstractSession) { AbstractSession abstractSession = ((AbstractSession)session); abstractSession.renewId(this); if (getRemoteUser() != null) abstractSession.setAttribute(AbstractSession.SESSION_KNOWN_ONLY_TO_AUTHENTICATED, Boolean.TRUE); if (abstractSession.isIdChanged()) _channel.getResponse().addCookie(_sessionManager.getSessionCookie(abstractSession, getContextPath(), isSecure())); } return session.getId(); }
public HttpSession getSession(boolean create) { if (_session != null) { if (_sessionManager != null && !_sessionManager.isValid(_session)) _session = null; else return _session; } if (!create) return null; if (_sessionManager == null) throw new IllegalStateException("No SessionManager"); _session = _sessionManager.newHttpSession(this); HttpCookie cookie = _sessionManager.getSessionCookie(_session,getContextPath(),isSecure()); if (cookie != null) _connection.getResponse().addCookie(cookie); return _session; }
public HttpSession getSession(boolean create) { if (_session != null) { if (_sessionManager != null && !_sessionManager.isValid(_session)) _session = null; else return _session; } if (!create) return null; if (_sessionManager == null) throw new IllegalStateException("No SessionManager"); _session = _sessionManager.newHttpSession(this); HttpCookie cookie = _sessionManager.getSessionCookie(_session,getContextPath(),isSecure()); if (cookie != null) _connection.getResponse().addCookie(cookie); return _session; }
public HttpSession getSession(boolean create) { if (_session != null) { if (_sessionManager != null && !_sessionManager.isValid(_session)) _session = null; else return _session; } if (!create) return null; if (_sessionManager == null) throw new IllegalStateException("No SessionManager"); _session = _sessionManager.newHttpSession(this); HttpCookie cookie = _sessionManager.getSessionCookie(_session,getContextPath(),isSecure()); if (cookie != null) _connection.getResponse().addCookie(cookie); return _session; }
@Override public HttpSession getSession(boolean create) { if (_session != null) { if (_sessionHandler != null && !_sessionHandler.isValid(_session)) _session = null; else return _session; } if (!create) return null; if (getResponse().isCommitted()) throw new IllegalStateException("Response is committed"); if (_sessionHandler == null) throw new IllegalStateException("No SessionManager"); _session = _sessionHandler.newHttpSession(this); HttpCookie cookie = _sessionHandler.getSessionCookie(_session,getContextPath(),isSecure()); if (cookie != null) _channel.getResponse().addCookie(cookie); return _session; }
public String changeSessionId() { HttpSession session = getSession(false); if (session == null) throw new IllegalStateException("No session"); if (session instanceof AbstractSession) { AbstractSession abstractSession = ((AbstractSession)session); abstractSession.renewId(this); if (getRemoteUser() != null) abstractSession.setAttribute(AbstractSession.SESSION_CREATED_SECURE, Boolean.TRUE); if (abstractSession.isIdChanged()) _channel.getResponse().addCookie(_sessionManager.getSessionCookie(abstractSession, getContextPath(), isSecure())); } return session.getId(); }
public String changeSessionId() { HttpSession session = getSession(false); if (session == null) throw new IllegalStateException("No session"); if (session instanceof AbstractSession) { AbstractSession abstractSession = ((AbstractSession)session); abstractSession.renewId(this); if (getRemoteUser() != null) abstractSession.setAttribute(AbstractSession.SESSION_KNOWN_ONLY_TO_AUTHENTICATED, Boolean.TRUE); if (abstractSession.isIdChanged()) _channel.getResponse().addCookie(_sessionManager.getSessionCookie(abstractSession, getContextPath(), isSecure())); } return session.getId(); }
abstractSession.setAttribute(AbstractSession.SESSION_KNOWN_ONLY_TO_AUTHENTICATED, Boolean.TRUE); if (abstractSession.isIdChanged() && response != null && (response instanceof Response)) ((Response)response).addCookie(abstractSession.getSessionManager().getSessionCookie(abstractSession, request.getContextPath(), request.isSecure())); LOG.debug("renew {}->{}",oldId,abstractSession.getId());
@Override public HttpSession getSession(boolean create) { if (_session != null) { if (_sessionManager != null && !_sessionManager.isValid(_session)) _session = null; else return _session; } if (!create) return null; if (getResponse().isCommitted()) throw new IllegalStateException("Response is committed"); if (_sessionManager == null) throw new IllegalStateException("No SessionManager"); _session = _sessionManager.newHttpSession(this); HttpCookie cookie = _sessionManager.getSessionCookie(_session,getContextPath(),isSecure()); if (cookie != null) _channel.getResponse().addCookie(cookie); return _session; }
@Override public String changeSessionId() { HttpSession session = getSession(false); if (session == null) throw new IllegalStateException("No session"); if (session instanceof Session) { Session s = ((Session)session); s.renewId(this); if (getRemoteUser() != null) s.setAttribute(Session.SESSION_CREATED_SECURE, Boolean.TRUE); if (s.isIdChanged() && _sessionHandler.isUsingCookies()) _channel.getResponse().addCookie(_sessionHandler.getSessionCookie(s, getContextPath(), isSecure())); } return session.getId(); }
abstractSession.setAttribute(AbstractSession.SESSION_KNOWN_ONLY_TO_AUTHENTICATED, Boolean.TRUE); if (abstractSession.isIdChanged() && response != null && (response instanceof Response)) ((Response)response).addCookie(abstractSession.getSessionManager().getSessionCookie(abstractSession, request.getContextPath(), request.isSecure())); LOG.debug("renew {}->{}",oldId,abstractSession.getId());
abstractSession.setAttribute(AbstractSession.SESSION_CREATED_SECURE, Boolean.TRUE); if (abstractSession.isIdChanged() && response != null && (response instanceof Response)) ((Response)response).addCookie(abstractSession.getSessionManager().getSessionCookie(abstractSession, request.getContextPath(), request.isSecure())); LOG.debug("renew {}->{}",oldId,abstractSession.getId());
@Override public HttpSession getSession(boolean create) { if (_session != null) { if (_sessionManager != null && !_sessionManager.isValid(_session)) _session = null; else return _session; } if (!create) return null; if (getResponse().isCommitted()) throw new IllegalStateException("Response is committed"); if (_sessionManager == null) throw new IllegalStateException("No SessionManager"); _session = _sessionManager.newHttpSession(this); HttpCookie cookie = _sessionManager.getSessionCookie(_session,getContextPath(),isSecure()); if (cookie != null) _channel.getResponse().addCookie(cookie); return _session; }
abstractSession.setAttribute(AbstractSession.SESSION_KNOWN_ONLY_TO_AUTHENTICATED, Boolean.TRUE); if (abstractSession.isIdChanged() && response != null && (response instanceof Response)) ((Response)response).addCookie(abstractSession.getSessionManager().getSessionCookie(abstractSession, request.getContextPath(), request.isSecure())); LOG.debug("renew {}->{}",oldId,abstractSession.getId());