cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject git commit: Updating JAXRS SecurityContext to better check for CXF SecurityContext
Date Thu, 15 May 2014 13:47:46 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 12d71c3a3 -> 85d44cf51


Updating JAXRS SecurityContext to better check for CXF SecurityContext


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/85d44cf5
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/85d44cf5
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/85d44cf5

Branch: refs/heads/master
Commit: 85d44cf5118e2799e0eb80533d3909f91ba198ff
Parents: 12d71c3
Author: Sergey Beryozkin <sberyozkin@talend.com>
Authored: Thu May 15 14:47:30 2014 +0100
Committer: Sergey Beryozkin <sberyozkin@talend.com>
Committed: Thu May 15 14:47:30 2014 +0100

----------------------------------------------------------------------
 .../java/org/apache/cxf/jaxrs/impl/SecurityContextImpl.java    | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/85d44cf5/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/SecurityContextImpl.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/SecurityContextImpl.java
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/SecurityContextImpl.java
index 2897d73..9c7f24f 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/SecurityContextImpl.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/SecurityContextImpl.java
@@ -61,8 +61,10 @@ public class SecurityContextImpl implements SecurityContext {
     }
 
     public Principal getUserPrincipal() {
-        org.apache.cxf.security.SecurityContext sc = 
-            m.get(org.apache.cxf.security.SecurityContext.class);
+        org.apache.cxf.security.SecurityContext sc = m.getContent(org.apache.cxf.security.SecurityContext.class);
+        if (sc == null) {
+            sc = m.get(org.apache.cxf.security.SecurityContext.class);
+        }
         return sc == null ? null : sc.getUserPrincipal();
     }
 


Mime
View raw message