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 379977BB3 for ; Thu, 6 Oct 2011 15:17:18 +0000 (UTC) Received: (qmail 46033 invoked by uid 500); 6 Oct 2011 15:17:18 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 45959 invoked by uid 500); 6 Oct 2011 15:17:18 -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 45952 invoked by uid 99); 6 Oct 2011 15:17:18 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Oct 2011 15:17:18 +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, 06 Oct 2011 15:17:15 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 9519023888E4 for ; Thu, 6 Oct 2011 15:16:54 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1179659 - /cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/ClaimsAttributeStatementProvider.java Date: Thu, 06 Oct 2011 15:16:54 -0000 To: commits@cxf.apache.org From: coheigea@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20111006151654.9519023888E4@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: coheigea Date: Thu Oct 6 15:16:54 2011 New Revision: 1179659 URL: http://svn.apache.org/viewvc?rev=1179659&view=rev Log: Relativise returned claim names against the namespace Modified: cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/ClaimsAttributeStatementProvider.java Modified: cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/ClaimsAttributeStatementProvider.java URL: http://svn.apache.org/viewvc/cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/ClaimsAttributeStatementProvider.java?rev=1179659&r1=1179658&r2=1179659&view=diff ============================================================================== --- cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/ClaimsAttributeStatementProvider.java (original) +++ cxf/trunk/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/ClaimsAttributeStatementProvider.java Thu Oct 6 15:16:54 2011 @@ -18,6 +18,7 @@ */ package org.apache.cxf.sts.claims; +import java.net.URI; import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; @@ -55,12 +56,13 @@ public class ClaimsAttributeStatementPro while (claimIterator.hasNext()) { Claim claim = claimIterator.next(); AttributeBean attributeBean = new AttributeBean(); + URI name = claim.getNamespace().relativize(claim.getClaimType()); if (WSConstants.WSS_SAML2_TOKEN_TYPE.equals(tokenType) || WSConstants.SAML2_NS.equals(tokenType)) { - attributeBean.setQualifiedName(claim.getClaimType().toString()); + attributeBean.setQualifiedName(name.toString()); attributeBean.setNameFormat(claim.getNamespace().toString()); } else { - attributeBean.setSimpleName(claim.getClaimType().toString()); + attributeBean.setSimpleName(name.toString()); attributeBean.setQualifiedName(claim.getNamespace().toString()); } attributeBean.setAttributeValues(Collections.singletonList(claim.getValue()));