cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [3/3] git commit: Fixing IssuedToken testcase
Date Thu, 26 Jun 2014 14:38:11 GMT
Fixing IssuedToken testcase


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

Branch: refs/heads/2.7.x-fixes
Commit: 67a6c11d4b2f9985c335b1147976b1a9042a689f
Parents: 4b77fdd
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Thu Jun 26 15:37:53 2014 +0100
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Thu Jun 26 15:37:53 2014 +0100

----------------------------------------------------------------------
 .../cxf/ws/security/SecurityConstants.java      |  6 ---
 .../apache/cxf/ws/security/trust/STSUtils.java  | 39 ++------------------
 2 files changed, 3 insertions(+), 42 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/67a6c11d/rt/ws/security/src/main/java/org/apache/cxf/ws/security/SecurityConstants.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/SecurityConstants.java
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/SecurityConstants.java
index e255d5a..dcf4a62 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/SecurityConstants.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/SecurityConstants.java
@@ -556,14 +556,8 @@ public final class SecurityConstants {
             DISABLE_STS_CLIENT_WSMEX_CALL_USING_EPR_ADDRESS, STS_TOKEN_CRYPTO,
             STS_TOKEN_PROPERTIES, STS_TOKEN_USERNAME, STS_TOKEN_ACT_AS, STS_TOKEN_ON_BEHALF_OF,
             TOKEN, TOKEN_ID, SUBJECT_ROLE_CLASSIFIER, SUBJECT_ROLE_CLASSIFIER_TYPE, MUST_UNDERSTAND,
-<<<<<<< HEAD
             ASYMMETRIC_SIGNATURE_ALGORITHM, ENABLE_SAML_ONE_TIME_USE_CACHE, SAML_ONE_TIME_USE_CACHE_INSTANCE,
-            CACHE_IDENTIFIER, CACHE_ISSUED_TOKEN_IN_ENDPOINT
-=======
-            ASYMMETRIC_SIGNATURE_ALGORITHM, PASSWORD_ENCRYPTOR_INSTANCE, ENABLE_SAML_ONE_TIME_USE_CACHE,
-            SAML_ONE_TIME_USE_CACHE_INSTANCE, ENABLE_STREAMING_SECURITY, RETURN_SECURITY_ERROR,
             CACHE_IDENTIFIER, CACHE_ISSUED_TOKEN_IN_ENDPOINT, PREFER_WSMEX_OVER_STS_CLIENT_CONFIG
->>>>>>> 417d938... Adding support for a cross-domain STS test
         }));
         ALL_PROPERTIES = Collections.unmodifiableSet(s);
     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/67a6c11d/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 e54545f..d91f6d7 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
@@ -48,6 +48,7 @@ import org.apache.cxf.service.model.ServiceInfo;
 import org.apache.cxf.transport.ConduitInitiator;
 import org.apache.cxf.transport.ConduitInitiatorManager;
 import org.apache.cxf.ws.addressing.EndpointReferenceType;
+import org.apache.cxf.ws.addressing.VersionTransformer;
 import org.apache.cxf.ws.security.SecurityConstants;
 import org.apache.cxf.ws.security.policy.model.IssuedToken;
 import org.apache.neethi.Policy;
@@ -91,42 +92,9 @@ public final class STSUtils {
     }
     
     public static STSClient getClient(Message message, String type, IssuedToken itok) {
-<<<<<<< HEAD
-        STSClient client = (STSClient)message
-            .getContextualProperty(SecurityConstants.STS_CLIENT);
-        if (client == null) {
-            if (type == null) {
-                type = "";
-            } else {
-                type = "." + type + "-client";
-            }
-            client = new STSClient(message.getExchange().get(Bus.class));
-            Endpoint ep = message.getExchange().get(Endpoint.class);
-            client.setEndpointName(ep.getEndpointInfo().getName().toString() + type);
-            client.setBeanName(ep.getEndpointInfo().getName().toString() + type);
-            if (MessageUtils.getContextualBoolean(message, SecurityConstants.STS_CLIENT_SOAP12_BINDING,
false)) {
-                client.setSoap12();
-            }
-        }
-        
-        if (client.getLocation() == null && client.getWsdlLocation() == null 
-            && itok != null && itok.getIssuerEpr() != null) {
-            EndpointReferenceType epr = itok.getIssuerEpr();
-            //configure via mex
-            boolean useEPRWSAAddrAsMEXLocation = 
-                !Boolean.valueOf((String)message.getContextualProperty(
-                    SecurityConstants.DISABLE_STS_CLIENT_WSMEX_CALL_USING_EPR_ADDRESS));
-            client.configureViaEPR(epr, useEPRWSAAddrAsMEXLocation);
-=======
         // Find out first if we have an EPR to get the STS Address (possibly via WS-MEX)
-        if (itok != null && itok.getIssuer() != null && message != null)
{
-            EndpointReferenceType epr = null;
-            try {
-                epr = VersionTransformer.parseEndpointReference(itok.getIssuer());
-            } catch (JAXBException e) {
-                throw new IllegalArgumentException(e);
-            }
-            
+        if (itok != null && itok.getIssuerEpr() != null && message != null)
{
+            EndpointReferenceType epr = itok.getIssuerEpr();
             String mexLocation = findMEXLocation(epr);
             // Configure via WS-MEX
             if (mexLocation != null
@@ -191,7 +159,6 @@ public final class STSUtils {
         client.setBeanName(ep.getEndpointInfo().getName().toString() + type);
         if (MessageUtils.getContextualBoolean(message, SecurityConstants.STS_CLIENT_SOAP12_BINDING,
false)) {
             client.setSoap12();
->>>>>>> 417d938... Adding support for a cross-domain STS test
         }
         
         return client;


Mime
View raw message