You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2015/04/28 12:52:37 UTC

[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 <co...@apache.org>
Authored: Mon Apr 27 16:09:15 2015 +0100
Committer: Colm O hEigeartaigh <co...@apache.org>
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) {