cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf-fediz git commit: Reporting the roles as JSON array only
Date Fri, 07 Jul 2017 12:11:47 GMT
Repository: cxf-fediz
Updated Branches:
  refs/heads/master 27acfdaf3 -> 99a2a4d60


Reporting the roles as JSON array only


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

Branch: refs/heads/master
Commit: 99a2a4d609fa7a97b030db90ff97ae57d8157a7f
Parents: 27acfda
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Fri Jul 7 13:11:31 2017 +0100
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Fri Jul 7 13:11:31 2017 +0100

----------------------------------------------------------------------
 .../apache/cxf/fediz/service/oidc/FedizSubjectCreator.java  | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/99a2a4d6/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/FedizSubjectCreator.java
----------------------------------------------------------------------
diff --git a/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/FedizSubjectCreator.java
b/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/FedizSubjectCreator.java
index 9674717..85c1256 100644
--- a/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/FedizSubjectCreator.java
+++ b/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/FedizSubjectCreator.java
@@ -195,17 +195,12 @@ public class FedizSubjectCreator implements SubjectCreator {
             }
         }
 
-        if (roles != null && !roles.isEmpty()
+        if (roles != null && !roles.isEmpty() 
             && supportedClaims.containsKey(FedizConstants.DEFAULT_ROLE_URI)) {
             
             String roleClaimName = supportedClaims.get(FedizConstants.DEFAULT_ROLE_URI);
-
             if (requestedClaimsList.contains(roleClaimName)) {
-                if (roles.size() == 1) {
-                    idToken.setClaim(roleClaimName, roles.get(0));
-                } else {
-                    idToken.setClaim(roleClaimName, roles);
-                }    
+                idToken.setClaim(roleClaimName, roles);
             }            
         }
 


Mime
View raw message