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:08:15 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes 0cad194ee -> 2680d111e


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/2680d111
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/2680d111
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/2680d111

Branch: refs/heads/3.1.x-fixes
Commit: 2680d111e54c90b9dca63df479f68e82716c0eb2
Parents: 0cad194
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:07:42 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/2680d111/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/2680d111/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