cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: Fixing 3.1.x build failure
Date Tue, 09 Aug 2016 16:21:23 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 0870a675e -> 73da1a165


Fixing 3.1.x build failure


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

Branch: refs/heads/master
Commit: 73da1a1652874f8d7ac1823f4fe37168525fdb18
Parents: 0870a67
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Tue Aug 9 17:19:12 2016 +0100
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Tue Aug 9 17:21:06 2016 +0100

----------------------------------------------------------------------
 .../oauth2/filters/LocalJwtAccessTokenValidator.java        | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/73da1a16/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/LocalJwtAccessTokenValidator.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/LocalJwtAccessTokenValidator.java
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/LocalJwtAccessTokenValidator.java
index 3a83b36..afabf56 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/LocalJwtAccessTokenValidator.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/LocalJwtAccessTokenValidator.java
@@ -74,8 +74,13 @@ public class LocalJwtAccessTokenValidator extends JoseJwtConsumer implements
Acc
         }
         Object resourceAud = claims.getClaim("resource");
         if (resourceAud != null) {
-            atv.setAudiences(resourceAud instanceof List ? CastUtils.cast((List<?>)resourceAud)

-                : Collections.<String>singletonList((String)resourceAud));
+            List<String> auds = null;
+            if (resourceAud instanceof List) {
+                auds = CastUtils.cast((List<?>)resourceAud);
+            } else {
+                auds = Collections.singletonList((String)resourceAud);
+            } 
+            atv.setAudiences(auds);
         }
         if (claims.getIssuer() != null) {
             atv.setTokenIssuer(claims.getIssuer());


Mime
View raw message