Return-Path: Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: (qmail 13282 invoked from network); 17 Feb 2011 15:44:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 17 Feb 2011 15:44:41 -0000 Received: (qmail 38596 invoked by uid 500); 17 Feb 2011 15:44:41 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 38487 invoked by uid 500); 17 Feb 2011 15:44:39 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 38480 invoked by uid 99); 17 Feb 2011 15:44:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Feb 2011 15:44:39 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Feb 2011 15:44:38 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 59AAF2388A40; Thu, 17 Feb 2011 15:44:18 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1071653 - /cxf/branches/2.3.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java Date: Thu, 17 Feb 2011 15:44:18 -0000 To: commits@cxf.apache.org From: coheigea@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110217154418.59AAF2388A40@eris.apache.org> Author: coheigea Date: Thu Feb 17 15:44:17 2011 New Revision: 1071653 URL: http://svn.apache.org/viewvc?rev=1071653&view=rev Log: Merged ID attribute fix from trunk. Modified: cxf/branches/2.3.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java Modified: cxf/branches/2.3.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java?rev=1071653&r1=1071652&r2=1071653&view=diff ============================================================================== --- cxf/branches/2.3.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java (original) +++ cxf/branches/2.3.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/trust/STSClient.java Thu Feb 17 15:44:17 2011 @@ -121,6 +121,7 @@ import org.apache.xml.security.keys.cont */ public class STSClient implements Configurable, InterceptorProvider { private static final Logger LOG = LogUtils.getL7dLogger(STSClient.class); + private static final String SAML2_NS = "urn:oasis:names:tc:SAML:2.0:assertion"; Bus bus; String name = "default.sts-client"; @@ -1002,7 +1003,17 @@ 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")) + && rst.hasAttributeNS(null, "AssertionID")) { + id = rst.getAttributeNS(null, "AssertionID"); + } else if (elName.equals(new QName(SAML2_NS, "Assertion")) + && rst.hasAttributeNS(null, "ID")) { + id = rst.getAttributeNS(null, "ID"); + } + if (id == null) { + id = this.getIDFromSTR(rst); + } } if (id == null && rar != null) { id = this.getIDFromSTR(rar);