diff options
author | Greg Wilkins | 2009-05-13 03:09:01 +0000 |
---|---|---|
committer | Greg Wilkins | 2009-05-13 03:09:01 +0000 |
commit | d29b5d3a4ed5ad9865f3e086479f52587cf58a4d (patch) | |
tree | 932789e2db661dcfa97351aef7d812f9c42ecab6 | |
parent | 5255060588411bce9e1a618b81a4694b922289ec (diff) | |
download | org.eclipse.jetty.project-d29b5d3a4ed5ad9865f3e086479f52587cf58a4d.tar.gz org.eclipse.jetty.project-d29b5d3a4ed5ad9865f3e086479f52587cf58a4d.tar.xz org.eclipse.jetty.project-d29b5d3a4ed5ad9865f3e086479f52587cf58a4d.zip |
275396 Added Authentication.Wrapped to allow JSAPI wrapping
git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@210 7e9141cc-0065-0410-87d8-b60c137991c4
-rw-r--r-- | VERSION.txt | 1 | ||||
-rw-r--r-- | jetty-security/src/main/java/org/eclipse/jetty/security/SecurityHandler.java | 5 | ||||
-rw-r--r-- | jetty-server/src/main/java/org/eclipse/jetty/server/Authentication.java | 11 |
3 files changed, 17 insertions, 0 deletions
diff --git a/VERSION.txt b/VERSION.txt index dfd08003ee..745921fcab 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -10,6 +10,7 @@ jetty-7.0.0.M2-SNAPSHOT + JETTY-1014 Enable start-stop-daemon by default on jetty.sh (START_STOP_DAEMON=1) + JETTY-1015 Reduce BayeuxClient and HttpClient lock contention + 275396 Added ScopedHandler to set servlet scope before security handler + + 275396 Added Authentication.Wrapped to allow JSAPI wrapping jetty-6.1.17 30 April 2009 + JETTY-936 Make optional dispatching to welcome files as servlets 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 b42d527aa3..97c7cca9e3 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 @@ -415,6 +415,11 @@ public abstract class SecurityHandler extends HandlerWrapper implements Authenti if (authentication==null || authentication==Authentication.NOT_CHECKED) authentication=authenticator.validateRequest(request, response, isAuthMandatory); + if (authentication instanceof Authentication.Wrapped) + { + request=((Authentication.Wrapped)authentication).getHttpServletRequest(); + response=((Authentication.Wrapped)authentication).getHttpServletResponse(); + } if (authentication instanceof Authentication.ResponseSent) { diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/Authentication.java b/jetty-server/src/main/java/org/eclipse/jetty/server/Authentication.java index 14b723bd56..cdef79f32b 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/Authentication.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/Authentication.java @@ -15,6 +15,8 @@ package org.eclipse.jetty.server; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; /* ------------------------------------------------------------ */ @@ -41,6 +43,15 @@ public interface Authentication void logout(); } + /* ------------------------------------------------------------ */ + /** A wrapped authentication with methods provide the + * wrapped request/response for use by the application + */ + public interface Wrapped extends Authentication + { + HttpServletRequest getHttpServletRequest(); + HttpServletResponse getHttpServletResponse(); + } /* ------------------------------------------------------------ */ /** A deferred authentication with methods to progress |