cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1163670 - in /cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy: ./ builders/ model/
Date Wed, 31 Aug 2011 15:45:39 GMT
Author: coheigea
Date: Wed Aug 31 15:45:38 2011
New Revision: 1163670

URL: http://svn.apache.org/viewvc?rev=1163670&view=rev
Log:
Add policy support for the SC13SecurityContextToken policy

Modified:
    cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/SPConstants.java
    cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SecureConversationTokenBuilder.java
    cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SecurityContextTokenBuilder.java
    cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/model/SecureConversationToken.java
    cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/model/SecurityContextToken.java

Modified: cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/SPConstants.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/SPConstants.java?rev=1163670&r1=1163669&r2=1163670&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/SPConstants.java
(original)
+++ cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/SPConstants.java
Wed Aug 31 15:45:38 2011
@@ -405,6 +405,8 @@ public abstract class SPConstants {
     
     public static final String SC10_SECURITY_CONTEXT_TOKEN = "SC10SecurityContextToken";
     
+    public static final String SC13_SECURITY_CONTEXT_TOKEN = "SC13SecurityContextToken";
+    
     public static final String BOOTSTRAP_POLICY = "BootstrapPolicy";
     
     ////////////////////////////////////////////////////////////////////////////////////////////////

Modified: cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SecureConversationTokenBuilder.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SecureConversationTokenBuilder.java?rev=1163670&r1=1163669&r2=1163670&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SecureConversationTokenBuilder.java
(original)
+++ cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SecureConversationTokenBuilder.java
Wed Aug 31 15:45:38 2011
@@ -59,7 +59,7 @@ public class SecureConversationTokenBuil
 
         String attribute = DOMUtils.getAttribute(element, consts.getIncludeToken());
         if (attribute == null) {
-            throw new IllegalArgumentException("SecurityContextToken doesn't contain "
+            throw new IllegalArgumentException("SecureConversationToken doesn't contain "
                                                + "any sp:IncludeToken attribute");
         }
 
@@ -100,6 +100,12 @@ public class SecureConversationTokenBuil
                                                    SPConstants.SC10_SECURITY_CONTEXT_TOKEN)
!= null) {
                     conversationToken.setSc10SecurityContextToken(true);
                 }
+                
+                if (DOMUtils.getFirstChildWithName(elem, 
+                        consts.getNamespace(),
+                        SPConstants.SC13_SECURITY_CONTEXT_TOKEN) != null) {
+                    conversationToken.setSc13SecurityContextToken(true);
+                }
 
                 Element bootstrapPolicyElement = DOMUtils.getFirstChildWithName(elem, 
                                                                                 consts.getNamespace(),

Modified: cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SecurityContextTokenBuilder.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SecurityContextTokenBuilder.java?rev=1163670&r1=1163669&r2=1163670&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SecurityContextTokenBuilder.java
(original)
+++ cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/SecurityContextTokenBuilder.java
Wed Aug 31 15:45:38 2011
@@ -74,6 +74,12 @@ public class SecurityContextTokenBuilder
                                                SPConstants.SC10_SECURITY_CONTEXT_TOKEN) !=
null) {
                 contextToken.setSc10SecurityContextToken(true);
             }
+            
+            if (DOMUtils.getFirstChildWithName(element,
+                    consts.getNamespace(),
+                    SPConstants.SC13_SECURITY_CONTEXT_TOKEN) != null) {
+                contextToken.setSc13SecurityContextToken(true);
+            }
         }
 
         return contextToken;

Modified: cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/model/SecureConversationToken.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/model/SecureConversationToken.java?rev=1163670&r1=1163669&r2=1163670&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/model/SecureConversationToken.java
(original)
+++ cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/model/SecureConversationToken.java
Wed Aug 31 15:45:38 2011
@@ -112,7 +112,7 @@ public class SecureConversationToken ext
         }
 
         if (isDerivedKeys() || isRequireExternalUriRef() || isSc10SecurityContextToken()
-            || bootstrapPolicy != null) {
+            || isSc13SecurityContextToken() || bootstrapPolicy != null) {
 
             String wspNamespaceURI = SPConstants.POLICY.getNamespaceURI();
 
@@ -150,6 +150,11 @@ public class SecureConversationToken ext
                 // <sp:SC10SecurityContextToken />
                 writer.writeEmptyElement(prefix, SPConstants.SC10_SECURITY_CONTEXT_TOKEN,
namespaceURI);
             }
+            
+            if (isSc13SecurityContextToken()) {
+                // <sp:SC13SecurityContextToken />
+                writer.writeEmptyElement(prefix, SPConstants.SC13_SECURITY_CONTEXT_TOKEN,
namespaceURI);
+            }
 
             if (bootstrapPolicy != null) {
                 // <sp:BootstrapPolicy ..>

Modified: cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/model/SecurityContextToken.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/model/SecurityContextToken.java?rev=1163670&r1=1163669&r2=1163670&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/model/SecurityContextToken.java
(original)
+++ cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/model/SecurityContextToken.java
Wed Aug 31 15:45:38 2011
@@ -33,6 +33,8 @@ public class SecurityContextToken extend
     boolean requireExternalUriRef;
 
     boolean sc10SecurityContextToken;
+    
+    boolean sc13SecurityContextToken;
 
     public SecurityContextToken(SPConstants version) {
         super(version);
@@ -65,6 +67,20 @@ public class SecurityContextToken extend
     public void setSc10SecurityContextToken(boolean sc10SecurityContextToken) {
         this.sc10SecurityContextToken = sc10SecurityContextToken;
     }
+    
+    /**
+     * @return Returns the sc13SecurityContextToken.
+     */
+    public boolean isSc13SecurityContextToken() {
+        return sc13SecurityContextToken;
+    }
+    
+    /**
+     * @param sc13SecurityContextToken The sc13SecurityContextToken to set.
+     */
+    public void setSc13SecurityContextToken(boolean sc13SecurityContextToken) {
+        this.sc13SecurityContextToken = sc13SecurityContextToken;
+    }
 
     /*
      * (non-Javadoc)



Mime
View raw message