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: Marking refreshToken scope as invisible to the client app
Date Fri, 04 Dec 2015 12:59:43 GMT
Repository: cxf-fediz
Updated Branches:
  refs/heads/master 29530b63f -> e711dc8ff


Marking refreshToken scope as invisible to the client app


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

Branch: refs/heads/master
Commit: e711dc8ff78c5eaa721aa02192687a05ddd6c3d6
Parents: 29530b6
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Fri Dec 4 12:59:20 2015 +0000
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Fri Dec 4 12:59:20 2015 +0000

----------------------------------------------------------------------
 .../org/apache/cxf/fediz/service/oidc/OAuthDataManager.java     | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/e711dc8f/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/OAuthDataManager.java
----------------------------------------------------------------------
diff --git a/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/OAuthDataManager.java
b/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/OAuthDataManager.java
index c4011d8..08db670 100644
--- a/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/OAuthDataManager.java
+++ b/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/OAuthDataManager.java
@@ -54,6 +54,7 @@ public class OAuthDataManager extends DefaultEHCacheCodeDataProvider {
         OPENID_PERMISSION.setDefault(true);
         REFRESH_TOKEN_PERMISSION = new OAuthPermission(OAuthConstants.REFRESH_TOKEN_SCOPE,

             "Refresh access tokens");
+        REFRESH_TOKEN_PERMISSION.setInvisibleToClient(true);
     }
 
     private Map<String, OAuthPermission> permissionMap = new HashMap<String, OAuthPermission>();
@@ -114,7 +115,9 @@ public class OAuthDataManager extends DefaultEHCacheCodeDataProvider {
             OAuthPermission permission = new OAuthPermission(entry.getKey(), entry.getValue());
             if (OidcUtils.OPENID_SCOPE.equals(entry.getKey())) {
                 permission.setDefault(true);
-            }
+            } else if (OAuthConstants.REFRESH_TOKEN_SCOPE.equals(entry.getKey())) {
+                permission.setInvisibleToClient(true);
+            } 
             permissionMap.put(entry.getKey(), permission);
         }
     }


Mime
View raw message