You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by se...@apache.org on 2016/02/15 13:52:08 UTC
cxf git commit: Making it simpler to inject the scopes map into
OAuth2 filter
Repository: cxf
Updated Branches:
refs/heads/master 8205b55b4 -> 4a433b51f
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/4a433b51
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/4a433b51
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/4a433b51
Branch: refs/heads/master
Commit: 4a433b51f496c7bdfee1e280848accc37884bfaa
Parents: 8205b55
Author: Sergey Beryozkin <sb...@gmail.com>
Authored: Mon Feb 15 12:51:52 2016 +0000
Committer: Sergey Beryozkin <sb...@gmail.com>
Committed: Mon Feb 15 12:51:52 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/4a433b51/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;
}