Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Wilkins2010-09-28 04:28:38 +0000
committerGreg Wilkins2010-09-28 04:28:38 +0000
commit25446eb2216f146caefdcb0fbae7617dd7c5c6cf (patch)
treeec50f6bb6d3c4caae42fe463188369dcd882bafd /jetty-security/src/main/java/org/eclipse/jetty/security/SecurityHandler.java
parent0f292471904834e4c51b89a533b97a880df67670 (diff)
downloadorg.eclipse.jetty.project-25446eb2216f146caefdcb0fbae7617dd7c5c6cf.tar.gz
org.eclipse.jetty.project-25446eb2216f146caefdcb0fbae7617dd7c5c6cf.tar.xz
org.eclipse.jetty.project-25446eb2216f146caefdcb0fbae7617dd7c5c6cf.zip
JETTY-1281 Create new session after authentication
git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@2304 7e9141cc-0065-0410-87d8-b60c137991c4
Diffstat (limited to 'jetty-security/src/main/java/org/eclipse/jetty/security/SecurityHandler.java')
-rw-r--r--jetty-security/src/main/java/org/eclipse/jetty/security/SecurityHandler.java23
1 files changed, 22 insertions, 1 deletions
diff --git a/jetty-security/src/main/java/org/eclipse/jetty/security/SecurityHandler.java b/jetty-security/src/main/java/org/eclipse/jetty/security/SecurityHandler.java
index 0d78853666..1817419032 100644
--- a/jetty-security/src/main/java/org/eclipse/jetty/security/SecurityHandler.java
+++ b/jetty-security/src/main/java/org/eclipse/jetty/security/SecurityHandler.java
@@ -50,7 +50,7 @@ import org.eclipse.jetty.util.log.Log;
* values in the SecurityHandler init parameters, are copied.
*
*/
-public abstract class SecurityHandler extends HandlerWrapper implements Authenticator.Configuration
+public abstract class SecurityHandler extends HandlerWrapper implements Authenticator.AuthConfiguration
{
/* ------------------------------------------------------------ */
private boolean _checkWelcomeFiles = false;
@@ -62,6 +62,7 @@ public abstract class SecurityHandler extends HandlerWrapper implements Authenti
private LoginService _loginService;
private boolean _loginServiceShared;
private IdentityService _identityService;
+ private boolean _renewSession=true;
/* ------------------------------------------------------------ */
protected SecurityHandler()
@@ -373,6 +374,26 @@ public abstract class SecurityHandler extends HandlerWrapper implements Authenti
}
/* ------------------------------------------------------------ */
+ /**
+ * @see org.eclipse.jetty.security.Authenticator.AuthConfiguration#isSessionRenewedOnAuthentication()
+ */
+ public boolean isSessionRenewedOnAuthentication()
+ {
+ return _renewSession;
+ }
+
+ /* ------------------------------------------------------------ */
+ /** Set renew the session on Authentication.
+ * <p>
+ * If set to true, then on authentication, the session associated with a reqeuest is invalidated and replaced with a new session.
+ * @see org.eclipse.jetty.security.Authenticator.AuthConfiguration#isSessionRenewedOnAuthentication()
+ */
+ public void setSessionRenewedOnAuthentication(boolean renew)
+ {
+ _renewSession=renew;
+ }
+
+ /* ------------------------------------------------------------ */
/*
* @see org.eclipse.jetty.server.Handler#handle(java.lang.String,
* javax.servlet.http.HttpServletRequest,

Back to the top