cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf-fediz git commit: Removing the cached client name when the client is removed
Date Mon, 28 Mar 2016 16:11:21 GMT
Repository: cxf-fediz
Updated Branches:
  refs/heads/master 455160560 -> ea5e0190a


Removing the cached client name when the client is removed


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

Branch: refs/heads/master
Commit: ea5e0190ad568a7ab0df9be498fd130a17e29519
Parents: 4551605
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Mon Mar 28 17:11:03 2016 +0100
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Mon Mar 28 17:11:03 2016 +0100

----------------------------------------------------------------------
 .../fediz/service/oidc/clients/ClientRegistrationService.java  | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf-fediz/blob/ea5e0190/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/clients/ClientRegistrationService.java
----------------------------------------------------------------------
diff --git a/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/clients/ClientRegistrationService.java
b/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/clients/ClientRegistrationService.java
index 9c78c34..a4e874a 100644
--- a/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/clients/ClientRegistrationService.java
+++ b/services/oidc/src/main/java/org/apache/cxf/fediz/service/oidc/clients/ClientRegistrationService.java
@@ -62,7 +62,7 @@ import org.apache.cxf.rs.security.oauth2.tokens.refresh.RefreshToken;
 import org.apache.cxf.rs.security.oauth2.utils.OAuthConstants;
 import org.apache.cxf.rt.security.crypto.CryptoUtils;
 
-@Path("/")
+@Path("/clients")
 public class ClientRegistrationService {
 
     private Map<String, Collection<Client>> registrations = new HashMap<String,
Collection<Client>>();
@@ -114,6 +114,10 @@ public class ClientRegistrationService {
             if (c.getClientId().equals(id)) {
                 clientProvider.removeClient(id);
                 it.remove();
+                Set<String> names = clientNames.get(getUserName());
+                if (names != null) {
+                    names.remove(c.getApplicationName());
+                }
                 break;
             }
         }


Mime
View raw message