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 way OAuth2 client is deleted
Date Thu, 14 Jan 2016 10:44:21 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes 64966a365 -> d5cbce130


Minor update to the way OAuth2 client is deleted


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

Branch: refs/heads/3.1.x-fixes
Commit: d5cbce1303076be91f66340e42e0218cdef3e954
Parents: 64966a3
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Thu Jan 14 10:41:27 2016 +0000
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Thu Jan 14 10:44:01 2016 +0000

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


http://git-wip-us.apache.org/repos/asf/cxf/blob/d5cbce13/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 2b0e651..9c0216c 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
@@ -57,10 +57,9 @@ public class DefaultEHCacheCodeDataProvider extends DefaultEHCacheOAuthDataProvi
     }
 
     @Override
-    public Client removeClient(String clientId) {
-        Client c = super.removeClient(clientId);
+    protected Client doRemoveClient(Client c) {
         removeClientCodeGrants(c);
-        return c;
+        return super.doRemoveClient(c);
     }
     
     protected void removeClientCodeGrants(Client c) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/d5cbce13/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 176bd7e..1f6ac00 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
@@ -83,8 +83,12 @@ public class DefaultEHCacheOAuthDataProvider extends AbstractOAuthDataProvider
{
     @Override
     public Client removeClient(String clientId) {
         Client c = getClient(clientId);
-        clientCache.remove(clientId);
+        return doRemoveClient(c);
+    }
+    
+    protected Client doRemoveClient(Client c) {
         removeClientTokens(c);
+        clientCache.remove(c.getClientId());
         return c;
     }
 


Mime
View raw message