cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r749421 - in /cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security: policy/interceptors/ trust/
Date Mon, 02 Mar 2009 19:31:06 GMT
Author: dkulp
Date: Mon Mar  2 19:31:06 2009
New Revision: 749421

URL: http://svn.apache.org/viewvc?rev=749421&view=rev
Log:
Make it possible to configure trust clients used for authenticating for ws-sc clients

Modified:
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/IssuedTokenInterceptorProvider.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SecureConversationTokenInterceptorProvider.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSUtils.java

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/IssuedTokenInterceptorProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/IssuedTokenInterceptorProvider.java?rev=749421&r1=749420&r2=749421&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/IssuedTokenInterceptorProvider.java
(original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/IssuedTokenInterceptorProvider.java
Mon Mar  2 19:31:06 2009
@@ -72,8 +72,9 @@
             .getContextualProperty(SecurityConstants.STS_CLIENT);
         if (client == null) {
             client = new STSClient(message.getExchange().get(Bus.class));
-            client.setBeanName(message.getExchange().get(Endpoint.class)
-                               .getEndpointInfo().getName().toString() + ".sts-client");
+            Endpoint ep = message.getExchange().get(Endpoint.class);
+            client.setEndpointName(ep.getEndpointInfo().getName().toString() + ".sts-client");
+            client.setBeanName(ep.getEndpointInfo().getName().toString() + ".sts-client");
         }
         return client;
     }

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SecureConversationTokenInterceptorProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SecureConversationTokenInterceptorProvider.java?rev=749421&r1=749420&r2=749421&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SecureConversationTokenInterceptorProvider.java
(original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SecureConversationTokenInterceptorProvider.java
Mon Mar  2 19:31:06 2009
@@ -222,8 +222,9 @@
             .getContextualProperty(SecurityConstants.STS_CLIENT);
         if (client == null) {
             client = new STSClient(message.getExchange().get(Bus.class));
-            client.setBeanName(message.getExchange().get(Endpoint.class)
-                               .getEndpointInfo().getName().toString() + ".sct-client");
+            Endpoint ep = message.getExchange().get(Endpoint.class);
+            client.setEndpointName(ep.getEndpointInfo().getName().toString() + ".sct-client");
+            client.setBeanName(ep.getEndpointInfo().getName().toString() + ".sct-client");
         }
         return client;
     }
@@ -516,7 +517,8 @@
                                                       null,
                                                       destination.getAddress().getAddress().getValue(),
                                                       message.getVersion().getBindingId(),

-                                                      policy);
+                                                      policy,
+                                                      null);
                 endpoint.getEndpointInfo().setProperty(TokenStore.class.getName(), store);
             
                 EndpointPolicy ep = pe.getServerEndpointPolicy(endpoint.getEndpointInfo(),
destination);

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java?rev=749421&r1=749420&r2=749421&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java
(original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java
Mon Mar  2 19:31:06 2009
@@ -234,7 +234,8 @@
                                                            null,
                                                            location,
                                                            soapVersion, 
-                                                           policy);
+                                                           policy,
+                                                           endpointName);
             
             client = new ClientImpl(bus, endpoint);
         }

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSUtils.java?rev=749421&r1=749420&r2=749421&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSUtils.java
(original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSUtils.java
Mon Mar  2 19:31:06 2009
@@ -75,7 +75,8 @@
                                              String transportId,
                                              String location,
                                              String soapVersion,
-                                             Policy policy) throws BusException, EndpointException
{
+                                             Policy policy,
+                                             QName epName) throws BusException, EndpointException
{
         Service service = null;
         String ns = namespace + "/wsdl";
         ServiceInfo si = new ServiceInfo();
@@ -111,7 +112,7 @@
         } 
         EndpointInfo ei = new EndpointInfo(si, transportId);
         ei.setBinding(bi);
-        ei.setName(iName);
+        ei.setName(epName == null ? iName : epName);
         ei.setAddress(location);
         si.addEndpoint(ei);
         ei.addExtensor(policy);



Mime
View raw message