cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1143503 - /cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java
Date Wed, 06 Jul 2011 17:14:03 GMT
Author: coheigea
Date: Wed Jul  6 17:14:02 2011
New Revision: 1143503

URL: http://svn.apache.org/viewvc?rev=1143503&view=rev
Log:
Added ability to set a Context attribute on the RequestSecurityToken

Modified:
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java

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=1143503&r1=1143502&r2=1143503&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
Wed Jul  6 17:14:02 2011
@@ -155,6 +155,7 @@ public class STSClient implements Config
     String keyType;
     boolean sendKeyType = true;
     Message message;
+    String context;
 
     Map<String, Object> ctx = new HashMap<String, Object>();
     
@@ -266,6 +267,14 @@ public class STSClient implements Config
     public void setEnableAppliesTo(boolean enableAppliesTo) {
         this.enableAppliesTo = enableAppliesTo;
     }
+    
+    public String getContext() {
+        return context;
+    }
+    
+    public void setContext(String context) {
+        this.context = context;
+    }
 
     public void setAlgorithmSuite(AlgorithmSuite ag) {
         algorithmSuite = ag;
@@ -472,8 +481,11 @@ public class STSClient implements Config
         W3CDOMStreamWriter writer = new W3CDOMStreamWriter();
         writer.writeStartElement("wst", "RequestSecurityToken", namespace);
         writer.writeNamespace("wst", namespace);
-        boolean wroteKeySize = false;
+        if (context != null) {
+            writer.writeAttribute(null, "Context", context);
+        }
         
+        boolean wroteKeySize = false;
         String keyTypeTemplate = null;
         String sptt = null;
         



Mime
View raw message