cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From owu...@apache.org
Subject svn commit: r1528987 - in /cxf/fediz/trunk/plugins: spring/src/main/java/org/apache/cxf/fediz/spring/web/ spring2/src/main/java/org/apache/cxf/fediz/spring/web/
Date Thu, 03 Oct 2013 20:03:26 GMT
Author: owulff
Date: Thu Oct  3 20:03:26 2013
New Revision: 1528987

URL: http://svn.apache.org/r1528987
Log:
Properly handle error condition for spring security

Modified:
    cxf/fediz/trunk/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/web/FederationAuthenticationEntryPoint.java
    cxf/fediz/trunk/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/web/FederationAuthenticationEntryPoint.java
    cxf/fediz/trunk/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/web/FederationAuthenticationFilter.java

Modified: cxf/fediz/trunk/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/web/FederationAuthenticationEntryPoint.java
URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/web/FederationAuthenticationEntryPoint.java?rev=1528987&r1=1528986&r2=1528987&view=diff
==============================================================================
--- cxf/fediz/trunk/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/web/FederationAuthenticationEntryPoint.java
(original)
+++ cxf/fediz/trunk/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/web/FederationAuthenticationEntryPoint.java
Thu Oct  3 20:03:26 2013
@@ -83,15 +83,12 @@ public class FederationAuthenticationEnt
             FederationProcessor wfProc = new FederationProcessorImpl();
             redirectUrl = wfProc.createSignInRequest(servletRequest, fedContext);
             if (redirectUrl == null) {
-                LOG.warn("Failed to create SignInRequest.");
-                response.sendError(
-                        HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Failed to create SignInRequest.");
+                LOG.warn("Failed to create SignInRequest. Redirect URL null");
+                throw new ServletException("Failed to create SignInRequest. Redirect URL
null");
             }
         } catch (ProcessingException ex) {
-            System.err.println("Failed to create SignInRequest: " + ex.getMessage());
-            LOG.warn("Failed to create SignInRequest: " + ex.getMessage());
-            response.sendError(
-                               HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Failed to create
SignInRequest.");
+            LOG.warn("Failed to create SignInRequest", ex);
+            throw new ServletException("Failed to create SignInRequest: " + ex.getMessage());
         }
         
         preCommence(servletRequest, response);

Modified: cxf/fediz/trunk/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/web/FederationAuthenticationEntryPoint.java
URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/web/FederationAuthenticationEntryPoint.java?rev=1528987&r1=1528986&r2=1528987&view=diff
==============================================================================
--- cxf/fediz/trunk/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/web/FederationAuthenticationEntryPoint.java
(original)
+++ cxf/fediz/trunk/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/web/FederationAuthenticationEntryPoint.java
Thu Oct  3 20:03:26 2013
@@ -86,15 +86,12 @@ public class FederationAuthenticationEnt
             FederationProcessor wfProc = new FederationProcessorImpl();
             redirectUrl = wfProc.createSignInRequest(servletRequest, fedContext);
             if (redirectUrl == null) {
-                LOG.warn("Failed to create SignInRequest.");
-                response.sendError(
-                        HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Failed to create SignInRequest.");
+                LOG.warn("Failed to create SignInRequest. Redirect URL null");
+                throw new ServletException("Failed to create SignInRequest. Redirect URL
null");
             }
         } catch (ProcessingException ex) {
-            System.err.println("Failed to create SignInRequest: " + ex.getMessage());
-            LOG.warn("Failed to create SignInRequest: " + ex.getMessage());
-            response.sendError(
-                               HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Failed to create
SignInRequest.");
+            LOG.warn("Failed to create SignInRequest", ex);
+            throw new ServletException("Failed to create SignInRequest: " + ex.getMessage());
         }
         
         preCommence(servletRequest, response);

Modified: cxf/fediz/trunk/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/web/FederationAuthenticationFilter.java
URL: http://svn.apache.org/viewvc/cxf/fediz/trunk/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/web/FederationAuthenticationFilter.java?rev=1528987&r1=1528986&r2=1528987&view=diff
==============================================================================
--- cxf/fediz/trunk/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/web/FederationAuthenticationFilter.java
(original)
+++ cxf/fediz/trunk/plugins/spring2/src/main/java/org/apache/cxf/fediz/spring/web/FederationAuthenticationFilter.java
Thu Oct  3 20:03:26 2013
@@ -31,14 +31,12 @@ import org.springframework.security.Auth
 import org.springframework.security.providers.UsernamePasswordAuthenticationToken;
 import org.springframework.security.ui.AbstractProcessingFilter;
 import org.springframework.security.ui.FilterChainOrder;
-//import org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler;
 
 
 public class FederationAuthenticationFilter extends AbstractProcessingFilter {
     
     public FederationAuthenticationFilter() {
         super();
-        //setAuthenticationFailureHandler(new SimpleUrlAuthenticationFailureHandler());
     }
 
     /**



Mime
View raw message