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 B5BD3189B6 for ; Tue, 28 Apr 2015 10:52:35 +0000 (UTC) Received: (qmail 73519 invoked by uid 500); 28 Apr 2015 10:52:35 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 73334 invoked by uid 500); 28 Apr 2015 10:52:35 -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 73218 invoked by uid 99); 28 Apr 2015 10:52:35 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Apr 2015 10:52:35 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 4399FE0562; Tue, 28 Apr 2015 10:52:35 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: coheigea@apache.org To: commits@cxf.apache.org Date: Tue, 28 Apr 2015 10:52:37 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [3/6] cxf git commit: Fall back to use the altPropname if "out/in" is not added Fall back to use the altPropname if "out/in" is not added Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/5938982c Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/5938982c Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/5938982c Branch: refs/heads/3.0.x-fixes Commit: 5938982cfb942443eb99791cccaad0c224c13821 Parents: 81aced6 Author: Colm O hEigeartaigh Authored: Mon Apr 27 16:09:15 2015 +0100 Committer: Colm O hEigeartaigh Committed: Mon Apr 27 16:40:25 2015 +0100 ---------------------------------------------------------------------- .../apache/cxf/rs/security/jose/jaxrs/KeyManagementUtils.java | 4 ++++ 1 file changed, 4 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/5938982c/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/KeyManagementUtils.java ---------------------------------------------------------------------- diff --git a/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/KeyManagementUtils.java b/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/KeyManagementUtils.java index 799a0c1..c525a69 100644 --- a/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/KeyManagementUtils.java +++ b/rt/rs/security/jose/src/main/java/org/apache/cxf/rs/security/jose/jaxrs/KeyManagementUtils.java @@ -167,6 +167,10 @@ public final class KeyManagementUtils { } String direction = m.getExchange().getOutMessage() == m ? ".out" : ".in"; kid = (String)MessageUtils.getContextualProperty(m, preferredPropertyName, altPropertyName + direction); + // Check whether the direction is not set for the altPropertyName + if (kid == null && altPropertyName != null) { + kid = (String)m.getContextualProperty(altPropertyName); + } } if (kid == null) {