cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [5/6] cxf-fediz git commit: Fixing Jetty plugins
Date Wed, 07 Dec 2016 12:13:21 GMT
Fixing Jetty plugins


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

Branch: refs/heads/master
Commit: dba87be392cf25381d376bdca09a9f1ff8ba974a
Parents: 2d903b5
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Wed Dec 7 11:33:39 2016 +0000
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Wed Dec 7 11:33:39 2016 +0000

----------------------------------------------------------------------
 .../org/apache/cxf/fediz/jetty8/FederationAuthenticator.java    | 5 +++--
 .../org/apache/cxf/fediz/jetty9/FederationAuthenticator.java    | 5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/dba87be3/plugins/jetty8/src/main/java/org/apache/cxf/fediz/jetty8/FederationAuthenticator.java
----------------------------------------------------------------------
diff --git a/plugins/jetty8/src/main/java/org/apache/cxf/fediz/jetty8/FederationAuthenticator.java
b/plugins/jetty8/src/main/java/org/apache/cxf/fediz/jetty8/FederationAuthenticator.java
index 3206871..dfeab1d 100644
--- a/plugins/jetty8/src/main/java/org/apache/cxf/fediz/jetty8/FederationAuthenticator.java
+++ b/plugins/jetty8/src/main/java/org/apache/cxf/fediz/jetty8/FederationAuthenticator.java
@@ -277,7 +277,7 @@ public class FederationAuthenticator extends LoginAuthenticator {
                 inputStream.close();
                 responseOutputStream.flush();
                 return Authentication.SEND_SUCCESS;
-            } else if (action != null) {
+            } else if (!FederationConstants.ACTION_SIGNOUT.equals(action) && action
!= null) {
                 LOG.warn("Not supported action found in parameter wa: " + action);
                 response.sendError(HttpServletResponse.SC_BAD_REQUEST);
                 return Authentication.UNAUTHENTICATED;
@@ -295,8 +295,9 @@ public class FederationAuthenticator extends LoginAuthenticator {
                 else
                 {
                     //logout
+                    boolean logout = FederationConstants.ACTION_SIGNOUT.equals(action);
                     String logoutUrl = fedConfig.getLogoutURL();
-                    if (logoutUrl != null && !logoutUrl.isEmpty() && uri.equals(contextName
+ logoutUrl)) {
+                    if (logout || logoutUrl != null && !logoutUrl.isEmpty() &&
uri.equals(contextName + logoutUrl)) {
                         session.invalidate();
 
                         FedizProcessor wfProc = 

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/dba87be3/plugins/jetty9/src/main/java/org/apache/cxf/fediz/jetty9/FederationAuthenticator.java
----------------------------------------------------------------------
diff --git a/plugins/jetty9/src/main/java/org/apache/cxf/fediz/jetty9/FederationAuthenticator.java
b/plugins/jetty9/src/main/java/org/apache/cxf/fediz/jetty9/FederationAuthenticator.java
index a08754b..7205e44 100644
--- a/plugins/jetty9/src/main/java/org/apache/cxf/fediz/jetty9/FederationAuthenticator.java
+++ b/plugins/jetty9/src/main/java/org/apache/cxf/fediz/jetty9/FederationAuthenticator.java
@@ -276,7 +276,7 @@ public class FederationAuthenticator extends LoginAuthenticator {
                 inputStream.close();
                 responseOutputStream.flush();
                 return Authentication.SEND_SUCCESS;
-            } else if (action != null) {
+            } else if (!FederationConstants.ACTION_SIGNOUT.equals(action) && action
!= null) {
                 LOG.warn("Not supported action found in parameter wa: " + action);
                 response.sendError(HttpServletResponse.SC_BAD_REQUEST);
                 return Authentication.UNAUTHENTICATED;
@@ -294,8 +294,9 @@ public class FederationAuthenticator extends LoginAuthenticator {
                 else
                 {
                     //logout
+                    boolean logout = FederationConstants.ACTION_SIGNOUT.equals(action);
                     String logoutUrl = fedConfig.getLogoutURL();
-                    if (logoutUrl != null && !logoutUrl.isEmpty() && uri.equals(contextName
+ logoutUrl)) {
+                    if (logout || logoutUrl != null && !logoutUrl.isEmpty() &&
uri.equals(contextName + logoutUrl)) {
                         session.invalidate();
 
                         FedizProcessor wfProc = 


Mime
View raw message