Return-Path: X-Original-To: apmail-cxf-commits-archive@www.apache.org Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8F52A97D7 for ; Thu, 17 May 2012 11:17:38 +0000 (UTC) Received: (qmail 25541 invoked by uid 500); 17 May 2012 11:17:38 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 25460 invoked by uid 500); 17 May 2012 11:17:38 -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 25451 invoked by uid 99); 17 May 2012 11:17:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 May 2012 11:17:38 +0000 X-ASF-Spam-Status: No, hits=-1996.3 required=5.0 tests=ALL_TRUSTED,LOTTO_AGENT 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 May 2012 11:17:36 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 8D5ED238896F; Thu, 17 May 2012 11:17:16 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1339552 - in /cxf/trunk/services/sts: sts-core/src/main/java/org/apache/cxf/sts/token/provider/SAMLTokenProvider.java systests/advanced/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-sts.xml Date: Thu, 17 May 2012 11:17:16 -0000 To: commits@cxf.apache.org From: coheigea@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120517111716.8D5ED238896F@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: coheigea Date: Thu May 17 11:17:16 2012 New Revision: 1339552 URL: http://svn.apache.org/viewvc?rev=1339552&view=rev Log: [CXF-4320] - Add the ClaimsAttributeStatementProvider by default to the SAMLTokenProvider Modified: cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/SAMLTokenProvider.java cxf/trunk/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-sts.xml Modified: cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/SAMLTokenProvider.java URL: http://svn.apache.org/viewvc/cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/SAMLTokenProvider.java?rev=1339552&r1=1339551&r2=1339552&view=diff ============================================================================== --- cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/SAMLTokenProvider.java (original) +++ cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/token/provider/SAMLTokenProvider.java Thu May 17 11:17:16 2012 @@ -39,6 +39,7 @@ import org.apache.cxf.helpers.DOMUtils; import org.apache.cxf.sts.STSConstants; import org.apache.cxf.sts.STSPropertiesMBean; import org.apache.cxf.sts.SignatureProperties; +import org.apache.cxf.sts.claims.ClaimsAttributeStatementProvider; import org.apache.cxf.sts.request.KeyRequirements; import org.apache.cxf.sts.request.Renewing; import org.apache.cxf.sts.request.TokenRequirements; @@ -457,7 +458,8 @@ public class SAMLTokenProvider implement } } - // If no statements, then default to the DefaultAttributeStatementProvider + // If no statements, then default to the DefaultAttributeStatementProvider and the + // ClaimsAttributeStatementProvider if ((attrBeanList == null || attrBeanList.isEmpty()) && (authBeanList == null || authBeanList.isEmpty()) && (authDecisionBeanList == null || authDecisionBeanList.isEmpty())) { @@ -465,6 +467,12 @@ public class SAMLTokenProvider implement AttributeStatementProvider attributeProvider = new DefaultAttributeStatementProvider(); AttributeStatementBean attributeBean = attributeProvider.getStatement(tokenParameters); attrBeanList.add(attributeBean); + + attributeProvider = new ClaimsAttributeStatementProvider(); + attributeBean = attributeProvider.getStatement(tokenParameters); + if (attributeBean != null) { + attrBeanList.add(attributeBean); + } } // Get the Subject and Conditions Modified: cxf/trunk/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-sts.xml URL: http://svn.apache.org/viewvc/cxf/trunk/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-sts.xml?rev=1339552&r1=1339551&r2=1339552&view=diff ============================================================================== --- cxf/trunk/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-sts.xml (original) +++ cxf/trunk/services/sts/systests/advanced/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-sts.xml Thu May 17 11:17:16 2012 @@ -89,9 +89,9 @@ - + - +