Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Bartel2015-10-23 03:10:42 +0000
committerJan Bartel2015-10-23 03:10:42 +0000
commitc5489bd7b2d071b0e7b95cf327c604b3a3cb6015 (patch)
tree7377925631108907b122fa3560136f85c27078a5 /jetty-security/src/main
parent305b7bb7764a3d3fb02dd7faab164252c686715c (diff)
downloadorg.eclipse.jetty.project-c5489bd7b2d071b0e7b95cf327c604b3a3cb6015.tar.gz
org.eclipse.jetty.project-c5489bd7b2d071b0e7b95cf327c604b3a3cb6015.tar.xz
org.eclipse.jetty.project-c5489bd7b2d071b0e7b95cf327c604b3a3cb6015.zip
Renaming from temporary session.x package
Diffstat (limited to 'jetty-security/src/main')
-rw-r--r--jetty-security/src/main/java/org/eclipse/jetty/security/authentication/LoginAuthenticator.java20
-rw-r--r--jetty-security/src/main/java/org/eclipse/jetty/security/authentication/SessionAuthentication.java4
2 files changed, 12 insertions, 12 deletions
diff --git a/jetty-security/src/main/java/org/eclipse/jetty/security/authentication/LoginAuthenticator.java b/jetty-security/src/main/java/org/eclipse/jetty/security/authentication/LoginAuthenticator.java
index e85b680fbe..63d41a0d46 100644
--- a/jetty-security/src/main/java/org/eclipse/jetty/security/authentication/LoginAuthenticator.java
+++ b/jetty-security/src/main/java/org/eclipse/jetty/security/authentication/LoginAuthenticator.java
@@ -29,7 +29,7 @@ import org.eclipse.jetty.security.LoginService;
import org.eclipse.jetty.server.Request;
import org.eclipse.jetty.server.Response;
import org.eclipse.jetty.server.UserIdentity;
-import org.eclipse.jetty.server.session.AbstractSession;
+import org.eclipse.jetty.server.session.Session;
import org.eclipse.jetty.util.log.Log;
import org.eclipse.jetty.util.log.Logger;
@@ -109,17 +109,17 @@ public abstract class LoginAuthenticator implements Authenticator
{
//if we should renew sessions, and there is an existing session that may have been seen by non-authenticated users
//(indicated by SESSION_SECURED not being set on the session) then we should change id
- if (httpSession.getAttribute(AbstractSession.SESSION_CREATED_SECURE)!=Boolean.TRUE)
+ if (httpSession.getAttribute(Session.SESSION_CREATED_SECURE)!=Boolean.TRUE)
{
- if (httpSession instanceof AbstractSession)
+ if (httpSession instanceof Session)
{
- AbstractSession abstractSession = (AbstractSession)httpSession;
- String oldId = abstractSession.getId();
- abstractSession.renewId(request);
- 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());
+ Session s = (Session)httpSession;
+ String oldId = s.getId();
+ s.renewId(request);
+ s.setAttribute(Session.SESSION_CREATED_SECURE, Boolean.TRUE);
+ if (s.isIdChanged() && response != null && (response instanceof Response))
+ ((Response)response).addCookie(s.getSessionManager().getSessionCookie(s, request.getContextPath(), request.isSecure()));
+ LOG.debug("renew {}->{}",oldId,s.getId());
}
else
LOG.warn("Unable to renew session "+httpSession);
diff --git a/jetty-security/src/main/java/org/eclipse/jetty/security/authentication/SessionAuthentication.java b/jetty-security/src/main/java/org/eclipse/jetty/security/authentication/SessionAuthentication.java
index 3a7c006b51..6c9681a858 100644
--- a/jetty-security/src/main/java/org/eclipse/jetty/security/authentication/SessionAuthentication.java
+++ b/jetty-security/src/main/java/org/eclipse/jetty/security/authentication/SessionAuthentication.java
@@ -33,7 +33,7 @@ import org.eclipse.jetty.security.AbstractUserAuthentication;
import org.eclipse.jetty.security.LoginService;
import org.eclipse.jetty.security.SecurityHandler;
import org.eclipse.jetty.server.UserIdentity;
-import org.eclipse.jetty.server.session.AbstractSession;
+import org.eclipse.jetty.server.session.Session;
import org.eclipse.jetty.util.log.Log;
import org.eclipse.jetty.util.log.Logger;
@@ -89,7 +89,7 @@ public class SessionAuthentication extends AbstractUserAuthentication implements
if (security!=null)
security.logout(this);
if (_session!=null)
- _session.removeAttribute(AbstractSession.SESSION_CREATED_SECURE);
+ _session.removeAttribute(Session.SESSION_CREATED_SECURE);
}
@Override

Back to the top