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:26:07 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 1d2ff721e -> eab841d54


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

Branch: refs/heads/master
Commit: eab841d5477c5e1ed21a49918defa79a0f1ad533
Parents: 1d2ff72
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:25:51 2016 +0100

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


http://git-wip-us.apache.org/repos/asf/cxf/blob/eab841d5/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 41acfef..d7d6169 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
@@ -411,11 +411,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