cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [1/2] cxf-fediz git commit: Log the REST + Lifetime Elements properly
Date Thu, 31 Mar 2016 15:26:54 GMT
Repository: cxf-fediz
Updated Branches:
  refs/heads/1.2.x-fixes 131931365 -> 089419373


Log the REST + Lifetime Elements properly


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

Branch: refs/heads/1.2.x-fixes
Commit: 4037734b362956578b3881d19048106a8e59efc4
Parents: 1319313
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Thu Mar 31 15:42:01 2016 +0100
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Thu Mar 31 16:06:05 2016 +0100

----------------------------------------------------------------------
 .../core/processor/FederationProcessorImpl.java  | 19 ++++++-------------
 1 file changed, 6 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/4037734b/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 25f715e..808be36 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
@@ -61,6 +61,7 @@ import org.apache.cxf.fediz.core.util.DOMUtils;
 import org.apache.wss4j.common.ext.WSPasswordCallback;
 import org.apache.wss4j.common.ext.WSSecurityException;
 import org.apache.wss4j.common.saml.SamlAssertionWrapper;
+import org.apache.wss4j.common.util.DOM2Writer;
 import org.apache.wss4j.dom.WSConstants;
 import org.apache.wss4j.dom.WSDataRef;
 import org.apache.wss4j.dom.WSDocInfo;
@@ -150,21 +151,13 @@ public class FederationProcessorImpl extends AbstractFedizProcessor
{
             }
             el = DOMUtils.getNextElement(el);
         }
+        
         if (LOG.isDebugEnabled()) {
-            LOG.debug("RST: " + ((rst != null)
-                ? rst.toString()
-                : "null"));
-            LOG.debug("Lifetime: " + ((lifetimeElem != null)
-                ? lifetimeElem.toString()
-                : "null"));
-            LOG.debug("Tokentype: " + ((tt != null)
-                ? tt.toString()
-                : "null"));
-        }
-        if (rst == null) {
-            LOG.warn("RequestedSecurityToken element not found in wresult");
-            throw new ProcessingException(TYPE.BAD_REQUEST);
+            LOG.debug("RST: {}", DOM2Writer.nodeToString(rst));
+            LOG.debug("Lifetime: {}", DOM2Writer.nodeToString(lifetimeElem));
         }
+        LOG.debug("Tokentype: {}", tt);
+        
         LifeTime lifeTime = null;
         if (lifetimeElem != null) {
             lifeTime = processLifeTime(lifetimeElem);


Mime
View raw message