cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1071643 - /cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java
Date Thu, 17 Feb 2011 15:29:10 GMT
Author: coheigea
Date: Thu Feb 17 15:29:10 2011
New Revision: 1071643

URL: http://svn.apache.org/viewvc?rev=1071643&view=rev
Log:
Try finding the ID directly from the SAML Assertion.

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=1071643&r1=1071642&r2=1071643&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
Thu Feb 17 15:29:10 2011
@@ -1011,7 +1011,15 @@ public class STSClient implements Config
     private String findID(Element rar, Element rur, Element rst) {
         String id = null;
         if (rst != null) {
-            id = this.getIDFromSTR(rst);
+            QName elName = DOMUtils.getElementQName(rst);
+            if (elName.equals(new QName(WSConstants.SAML_NS, "Assertion"))) {
+                id = rst.getAttributeNS(null, "AssertionID");
+            } else if (elName.equals(new QName(WSConstants.SAML2_NS, "Assertion"))) {
+                id = rst.getAttributeNS(null, "ID");
+            }
+            if (id == null) {
+                id = this.getIDFromSTR(rst);
+            }
         }
         if (id == null && rar != null) {
             id = this.getIDFromSTR(rar);



Mime
View raw message