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/80bee63b Tree: http://git-wip-us.apache.org/repos/asf/cxf-fediz/tree/80bee63b Diff: http://git-wip-us.apache.org/repos/asf/cxf-fediz/diff/80bee63b Branch: refs/heads/1.3.x-fixes Commit: 80bee63bb5fb08e267bceebbcffe187fe8ac0a30 Parents: 7ee7535 Author: Colm O hEigeartaigh <[email protected]> Authored: Wed Dec 7 11:33:39 2016 +0000 Committer: Colm O hEigeartaigh <[email protected]> Committed: Wed Dec 7 12:14:19 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/80bee63b/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/80bee63b/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 =
