cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [4/6] cxf-fediz git commit: Fixing Logout via action for the Spring plugin
Date Wed, 07 Dec 2016 12:38:37 GMT
Fixing Logout via action for the Spring plugin


Project: http://git-wip-us.apache.org/repos/asf/cxf-fediz/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf-fediz/commit/7ee75357
Tree: http://git-wip-us.apache.org/repos/asf/cxf-fediz/tree/7ee75357
Diff: http://git-wip-us.apache.org/repos/asf/cxf-fediz/diff/7ee75357

Branch: refs/heads/1.3.x-fixes
Commit: 7ee753570a977f5aedc9d7b7ce5209ae4ca0bde5
Parents: 9d69aca
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Wed Dec 7 10:50:41 2016 +0000
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Wed Dec 7 12:14:09 2016 +0000

----------------------------------------------------------------------
 .../apache/cxf/fediz/spring/web/FederationLogoutFilter.java  | 7 +++++++
 .../org/apache/cxf/fediz/integrationtests/Spring2Test.java   | 8 ++++++++
 2 files changed, 15 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/7ee75357/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/web/FederationLogoutFilter.java
----------------------------------------------------------------------
diff --git a/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/web/FederationLogoutFilter.java
b/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/web/FederationLogoutFilter.java
index f8f3f3a..e0356a9 100644
--- a/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/web/FederationLogoutFilter.java
+++ b/plugins/spring/src/main/java/org/apache/cxf/fediz/spring/web/FederationLogoutFilter.java
@@ -21,6 +21,7 @@ package org.apache.cxf.fediz.spring.web;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import org.apache.cxf.fediz.core.FederationConstants;
 import org.apache.cxf.fediz.spring.FederationConfig;
 import org.springframework.beans.factory.annotation.Required;
 import org.springframework.security.web.authentication.logout.LogoutFilter;
@@ -44,6 +45,12 @@ public class FederationLogoutFilter extends LogoutFilter {
 
     @Override
     protected boolean requiresLogout(HttpServletRequest request, HttpServletResponse response)
{
+        String wa = request.getParameter(FederationConstants.PARAM_ACTION);
+        if (FederationConstants.ACTION_SIGNOUT.equals(wa) || FederationConstants.ACTION_SIGNOUT_CLEANUP.equals(wa))
{
+            // Default WS-Federation logout action
+            return true;
+        }
+        
         if (this.logoutUrl == null) {
             String contextName = request.getContextPath();
             if (contextName == null || contextName.isEmpty()) {

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/7ee75357/systests/spring/src/test/java/org/apache/cxf/fediz/integrationtests/Spring2Test.java
----------------------------------------------------------------------
diff --git a/systests/spring/src/test/java/org/apache/cxf/fediz/integrationtests/Spring2Test.java
b/systests/spring/src/test/java/org/apache/cxf/fediz/integrationtests/Spring2Test.java
index d9e77ab..f9754ba 100644
--- a/systests/spring/src/test/java/org/apache/cxf/fediz/integrationtests/Spring2Test.java
+++ b/systests/spring/src/test/java/org/apache/cxf/fediz/integrationtests/Spring2Test.java
@@ -184,6 +184,13 @@ public class Spring2Test extends AbstractTests {
         
     }
     
+    @Test
+    @Ignore("Logout not supported with Spring2")
+    @Override
+    public void testRPLogoutViaAction() throws Exception {
+        
+    }
+    
     @Override
     @Test
     public void testAliceModifiedSignature() throws Exception {
@@ -242,4 +249,5 @@ public class Spring2Test extends AbstractTests {
     public void testEntityExpansionAttack() throws Exception {
 
     }
+    
 }


Mime
View raw message