cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject [2/2] cxf git commit: Making it simpler to inject the scopes map into OAuth2 filter
Date Mon, 15 Feb 2016 12:54:50 GMT
Making it simpler to inject the scopes map into OAuth2 filter


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

Branch: refs/heads/3.1.x-fixes
Commit: cff8364b9c3aeef1fc0cc5fccb1d0fe4c40776ea
Parents: cf9d213
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Mon Feb 15 12:51:52 2016 +0000
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Mon Feb 15 12:54:37 2016 +0000

----------------------------------------------------------------------
 .../cxf/rs/security/oauth2/filters/OAuthScopesFilter.java      | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/cff8364b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/OAuthScopesFilter.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/OAuthScopesFilter.java
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/OAuthScopesFilter.java
index 5d91481..56ed41b 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/OAuthScopesFilter.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/OAuthScopesFilter.java
@@ -150,6 +150,12 @@ public class OAuthScopesFilter implements ContainerRequestFilter {
         this.scopesMap = scopesMap;
     }
 
+    public void setScopesStringMap(Map<String, String> scopesStringMap) {
+        for (Map.Entry<String, String> entry : scopesStringMap.entrySet()) {
+            scopesMap.put(entry.getKey(), Arrays.asList(entry.getValue().split(" ")));
+        }
+    }
+    
     public void setScopesMatchAllMap(Map<String, Boolean> scopesMatchAllMap) {
         this.scopesMatchAllMap = scopesMatchAllMap;
     }


Mime
View raw message