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 the abstract OAuth2 provider
Date Tue, 27 Sep 2016 10:28:30 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes 6e9def4f5 -> 50c705a2c


Minor update to the abstract OAuth2 provider


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

Branch: refs/heads/3.1.x-fixes
Commit: 50c705a2c69589e2ecce6e93550aad687468ecff
Parents: 6e9def4
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Tue Sep 27 11:25:51 2016 +0100
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Tue Sep 27 11:28:06 2016 +0100

----------------------------------------------------------------------
 .../oauth2/provider/AbstractOAuthDataProvider.java    | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/50c705a2/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/AbstractOAuthDataProvider.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/AbstractOAuthDataProvider.java
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/AbstractOAuthDataProvider.java
index a2fb184..f2c066c 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/AbstractOAuthDataProvider.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/AbstractOAuthDataProvider.java
@@ -416,11 +416,17 @@ public abstract class AbstractOAuthDataProvider implements OAuthDataProvider,
Cl
     }
     
     protected void removeClientTokens(Client c) {
-        for (RefreshToken rt : getRefreshTokens(c, null)) {
-            revokeRefreshToken(rt.getTokenKey());
+        List<RefreshToken> refreshTokens = getRefreshTokens(c, null);
+        if (refreshTokens != null) {
+            for (RefreshToken rt : refreshTokens) {
+                revokeRefreshToken(rt.getTokenKey());
+            }
         }
-        for (ServerAccessToken at : getAccessTokens(c, null)) {
-            revokeAccessToken(at.getTokenKey());
+        List<ServerAccessToken> accessTokens = getAccessTokens(c, null);
+        if (accessTokens != null) {
+            for (ServerAccessToken at : accessTokens) {
+                revokeAccessToken(at.getTokenKey());
+            }
         }
     }
     


Mime
View raw message