cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject git commit: Minor update
Date Fri, 29 Aug 2014 14:36:11 GMT
Repository: cxf-fediz
Updated Branches:
  refs/heads/master e266cd527 -> 1ce47fcb9


Minor update


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

Branch: refs/heads/master
Commit: 1ce47fcb9fe1165f45c11ab1abe70426327343fb
Parents: e266cd5
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Fri Aug 29 15:35:57 2014 +0100
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Fri Aug 29 15:35:57 2014 +0100

----------------------------------------------------------------------
 .../cxf/fediz/core/processor/FederationProcessorImpl.java     | 6 ++----
 .../cxf/fediz/cxf/plugin/FedizRedirectBindingFilter.java      | 7 +++++--
 2 files changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/1ce47fcb/plugins/core/src/main/java/org/apache/cxf/fediz/core/processor/FederationProcessorImpl.java
----------------------------------------------------------------------
diff --git a/plugins/core/src/main/java/org/apache/cxf/fediz/core/processor/FederationProcessorImpl.java
b/plugins/core/src/main/java/org/apache/cxf/fediz/core/processor/FederationProcessorImpl.java
index 370e1c7..c4df1a6 100644
--- a/plugins/core/src/main/java/org/apache/cxf/fediz/core/processor/FederationProcessorImpl.java
+++ b/plugins/core/src/main/java/org/apache/cxf/fediz/core/processor/FederationProcessorImpl.java
@@ -19,8 +19,8 @@
 
 package org.apache.cxf.fediz.core.processor;
 
-import java.io.ByteArrayInputStream;
 import java.io.IOException;
+import java.io.StringReader;
 import java.io.UnsupportedEncodingException;
 import java.net.MalformedURLException;
 import java.net.URL;
@@ -111,12 +111,10 @@ public class FederationProcessorImpl extends AbstractFedizProcessor
{
             FedizRequest request, FedizContext config)
         throws ProcessingException {
         
-        byte[] wresult = request.getResponseToken().getBytes();
-
         Document doc = null;
         Element el = null;
         try {
-            doc = DOMUtils.readXml(new ByteArrayInputStream(wresult));
+            doc = DOMUtils.readXml(new StringReader(request.getResponseToken()));
             el = doc.getDocumentElement();
 
         } catch (Exception e) {

http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/1ce47fcb/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 ea61177..5b8ba8d 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
@@ -19,7 +19,9 @@
 package org.apache.cxf.fediz.cxf.plugin;
 
 import java.io.IOException;
+import java.io.UnsupportedEncodingException;
 import java.net.URI;
+import java.net.URLDecoder;
 import java.security.cert.X509Certificate;
 import java.util.Collections;
 import java.util.Date;
@@ -237,10 +239,11 @@ public class FedizRedirectBindingFilter extends AbstractServiceProviderFilter
{
         FedizContext fedConfig,
         MultivaluedMap<String, String> params,
         String responseToken
-    ) {
+    ) throws UnsupportedEncodingException {
         FedizRequest wfReq = new FedizRequest();
         wfReq.setAction(params.getFirst(FederationConstants.PARAM_ACTION));
-        wfReq.setResponseToken(responseToken);
+        // TODO wfReq.setResponseToken(responseToken);
+        wfReq.setResponseToken(URLDecoder.decode(responseToken, "UTF-8"));
         String relayState = params.getFirst("RelayState");
         wfReq.setState(relayState);
         if (relayState != null) {


Mime
View raw message