cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: Minor update to OAuth providers so that all the tokens/grants in the system can be retrieved at once if needed
Date Wed, 13 Jan 2016 14:06:39 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 8b92fe57d -> cf96f7913


Minor update to OAuth providers so that all the tokens/grants in the system can be retrieved
at once if needed


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

Branch: refs/heads/master
Commit: cf96f7913ab996c530b0841759db648f5bd92667
Parents: 8b92fe5
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Wed Jan 13 14:06:24 2016 +0000
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Wed Jan 13 14:06:24 2016 +0000

----------------------------------------------------------------------
 .../oauth2/grants/code/DefaultEHCacheCodeDataProvider.java       | 2 +-
 .../oauth2/provider/DefaultEHCacheOAuthDataProvider.java         | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/cf96f791/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/DefaultEHCacheCodeDataProvider.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/DefaultEHCacheCodeDataProvider.java
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/DefaultEHCacheCodeDataProvider.java
index 768b969..2b0e651 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/DefaultEHCacheCodeDataProvider.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/grants/code/DefaultEHCacheCodeDataProvider.java
@@ -88,7 +88,7 @@ public class DefaultEHCacheCodeDataProvider extends DefaultEHCacheOAuthDataProvi
             new ArrayList<ServerAuthorizationCodeGrant>(keys.size());
         for (String key : keys) {
             ServerAuthorizationCodeGrant grant = getCodeGrant(key);
-            if (grant.getClient().getClientId().equals(c.getClientId())) {
+            if (c == null || grant.getClient().getClientId().equals(c.getClientId())) {
                 grants.add(grant);
             }
         }

http://git-wip-us.apache.org/repos/asf/cxf/blob/cf96f791/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/DefaultEHCacheOAuthDataProvider.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/DefaultEHCacheOAuthDataProvider.java
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/DefaultEHCacheOAuthDataProvider.java
index 7d8a556..176bd7e 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/DefaultEHCacheOAuthDataProvider.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/DefaultEHCacheOAuthDataProvider.java
@@ -109,7 +109,7 @@ public class DefaultEHCacheOAuthDataProvider extends AbstractOAuthDataProvider
{
         List<ServerAccessToken> tokens = new ArrayList<ServerAccessToken>(keys.size());
         for (String key : keys) {
             ServerAccessToken token = getAccessToken(key);
-            if (token.getClient().getClientId().equals(c.getClientId())) {
+            if (c == null || token.getClient().getClientId().equals(c.getClientId())) {
                 tokens.add(token);
             }
         }
@@ -122,7 +122,7 @@ public class DefaultEHCacheOAuthDataProvider extends AbstractOAuthDataProvider
{
         List<RefreshToken> tokens = new ArrayList<RefreshToken>(keys.size());
         for (String key : keys) {
             RefreshToken token = getRefreshToken(key);
-            if (token.getClient().getClientId().equals(c.getClientId())) {
+            if (c == null || token.getClient().getClientId().equals(c.getClientId())) {
                 tokens.add(token);
             }
         }


Mime
View raw message