cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [1/2] git commit: URLDecode the Fediz response
Date Mon, 01 Sep 2014 13:14:28 GMT
Repository: cxf-fediz
Updated Branches:
  refs/heads/master 1ce47fcb9 -> 7078bdc7f


URLDecode the Fediz response


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

Branch: refs/heads/master
Commit: 33241a60391563ed7698a8348c9dcd2996902a1b
Parents: 1ce47fc
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Mon Sep 1 11:36:48 2014 +0100
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Mon Sep 1 11:36:48 2014 +0100

----------------------------------------------------------------------
 .../cxf/fediz/cxf/plugin/FedizRedirectBindingFilter.java     | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/33241a60/plugins/cxf/src/main/java/org/apache/cxf/fediz/cxf/plugin/FedizRedirectBindingFilter.java
----------------------------------------------------------------------
diff --git a/plugins/cxf/src/main/java/org/apache/cxf/fediz/cxf/plugin/FedizRedirectBindingFilter.java
b/plugins/cxf/src/main/java/org/apache/cxf/fediz/cxf/plugin/FedizRedirectBindingFilter.java
index 5b8ba8d..a10ed5d 100644
--- a/plugins/cxf/src/main/java/org/apache/cxf/fediz/cxf/plugin/FedizRedirectBindingFilter.java
+++ b/plugins/cxf/src/main/java/org/apache/cxf/fediz/cxf/plugin/FedizRedirectBindingFilter.java
@@ -227,7 +227,10 @@ public class FedizRedirectBindingFilter extends AbstractServiceProviderFilter
{
     private String getResponseToken(FedizContext fedConfig, MultivaluedMap<String, String>
params) 
         throws IOException {
         if (params != null && fedConfig.getProtocol() instanceof FederationProtocol)
{
-            return params.getFirst(FederationConstants.PARAM_RESULT);
+            String result = params.getFirst(FederationConstants.PARAM_RESULT);
+            if (result != null) {
+                return URLDecoder.decode(result, "UTF-8");
+            }
         } else if (params != null && fedConfig.getProtocol() instanceof SAMLProtocol)
{
             return params.getFirst(SAMLSSOConstants.SAML_RESPONSE);
         }
@@ -242,8 +245,7 @@ public class FedizRedirectBindingFilter extends AbstractServiceProviderFilter
{
     ) throws UnsupportedEncodingException {
         FedizRequest wfReq = new FedizRequest();
         wfReq.setAction(params.getFirst(FederationConstants.PARAM_ACTION));
-        // TODO wfReq.setResponseToken(responseToken);
-        wfReq.setResponseToken(URLDecoder.decode(responseToken, "UTF-8"));
+        wfReq.setResponseToken(responseToken);
         String relayState = params.getFirst("RelayState");
         wfReq.setState(relayState);
         if (relayState != null) {


Mime
View raw message