cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [1/3] cxf git commit: [CXF-6600] - Sudden repeating NPE on token request by STSClient
Date Thu, 24 Sep 2015 10:31:51 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes c7e209ade -> d9396a052


[CXF-6600] - Sudden repeating NPE on token request by STSClient

Conflicts:
	rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSUtils.java


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

Branch: refs/heads/3.0.x-fixes
Commit: c4f4ebf25b99cb6d6c2107b36635705cf00d25bf
Parents: c7e209a
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Thu Sep 24 10:51:26 2015 +0100
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Thu Sep 24 11:31:43 2015 +0100

----------------------------------------------------------------------
 .../org/apache/cxf/ws/security/trust/STSUtils.java    | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/c4f4ebf2/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSUtils.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSUtils.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSUtils.java
index bc4d830..0de15aa 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSUtils.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSUtils.java
@@ -110,9 +110,19 @@ public final class STSUtils {
             }
         }
         
+        boolean preferWSMex = 
+            SecurityUtils.getSecurityPropertyBoolean(SecurityConstants.PREFER_WSMEX_OVER_STS_CLIENT_CONFIG,
+                                                     message, 
+                                                     false);
         
         // Find out if we have an EPR to get the STS Address (possibly via WS-MEX)
+<<<<<<< HEAD
         if (itok != null && itok.getIssuer() != null && message != null)
{
+=======
+        // Only parse the EPR if we really have to
+        if (issuer != null
+            && (preferWSMex || client.getLocation() == null && client.getWsdlLocation()
== null)) {
+>>>>>>> 9dc7a39... [CXF-6600] - Sudden repeating NPE on token request
by STSClient
             EndpointReferenceType epr = null;
             try {
                 epr = VersionTransformer.parseEndpointReference(itok.getIssuer());
@@ -120,12 +130,16 @@ public final class STSUtils {
                 throw new IllegalArgumentException(e);
             }
             
+<<<<<<< HEAD
             String mexLocation = findMEXLocation(epr);
             // Configure via WS-MEX
             if (mexLocation != null
                 && MessageUtils.getContextualBoolean(message, 
                                                      SecurityConstants.PREFER_WSMEX_OVER_STS_CLIENT_CONFIG,
                                                      false)) {
+=======
+            if (preferWSMex && findMEXLocation(epr) != null) {
+>>>>>>> 9dc7a39... [CXF-6600] - Sudden repeating NPE on token request
by STSClient
                 // WS-MEX call. So now either get the WS-MEX specific STSClient or else create
one
                 STSClient wsMexClient = (STSClient)message
                     .getContextualProperty(SecurityConstants.STS_CLIENT + ".wsmex");


Mime
View raw message