incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r900811 - /sling/trunk/bundles/commons/auth/src/main/java/org/apache/sling/commons/auth/impl/engine/EngineSlingAuthenticator.java
Date Tue, 19 Jan 2010 15:07:34 GMT
Author: fmeschbe
Date: Tue Jan 19 15:07:33 2010
New Revision: 900811

URL: http://svn.apache.org/viewvc?rev=900811&view=rev
Log:
SLING-1297 wrap new org.apache.sling.commons.auth.NoAuthenticationHandlerException in old
org.apache.sling.engine.auth.NoAuthenticationHandlerException to support backwards compatibility.

Modified:
    sling/trunk/bundles/commons/auth/src/main/java/org/apache/sling/commons/auth/impl/engine/EngineSlingAuthenticator.java

Modified: sling/trunk/bundles/commons/auth/src/main/java/org/apache/sling/commons/auth/impl/engine/EngineSlingAuthenticator.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/commons/auth/src/main/java/org/apache/sling/commons/auth/impl/engine/EngineSlingAuthenticator.java?rev=900811&r1=900810&r2=900811&view=diff
==============================================================================
--- sling/trunk/bundles/commons/auth/src/main/java/org/apache/sling/commons/auth/impl/engine/EngineSlingAuthenticator.java
(original)
+++ sling/trunk/bundles/commons/auth/src/main/java/org/apache/sling/commons/auth/impl/engine/EngineSlingAuthenticator.java
Tue Jan 19 15:07:33 2010
@@ -21,6 +21,7 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import org.apache.sling.commons.auth.NoAuthenticationHandlerException;
 import org.apache.sling.engine.auth.Authenticator;
 
 /**
@@ -44,7 +45,13 @@
     private org.apache.sling.commons.auth.Authenticator slingAuthenticator;
 
     public void login(HttpServletRequest request, HttpServletResponse response) {
-        slingAuthenticator.login(request, response);
+        try {
+            slingAuthenticator.login(request, response);
+        } catch (NoAuthenticationHandlerException nahe) {
+            final org.apache.sling.engine.auth.NoAuthenticationHandlerException wrapped =
new org.apache.sling.engine.auth.NoAuthenticationHandlerException();
+            wrapped.initCause(nahe);
+            throw wrapped;
+        }
     }
 
     public void logout(HttpServletRequest request, HttpServletResponse response) {



Mime
View raw message