You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2021/09/09 22:28:38 UTC

[GitHub] [geode] mhansonp commented on a change in pull request #6835: GEODE-9457: re-authentication in event dispatcher

mhansonp commented on a change in pull request #6835:
URL: https://github.com/apache/geode/pull/6835#discussion_r705739557



##########
File path: geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/ClientUserAuths.java
##########
@@ -49,10 +50,18 @@ public Long putUserAuth(UserAuthAttributes userAuthAttr) {
     return newId;
   }
 
-  public Long putSubject(Subject subject) {
-    final Long newId = getNextID();
+  public Long putSubject(Subject subject, long existingUniqueId) {
+    final Long newId;
+    if (existingUniqueId == 0 || existingUniqueId == -1) {
+      newId = getNextID();
+    } else {
+      // the user re-authenticate back, remove the existing subject, reuse the uniqueId
+      removeSubject(existingUniqueId);
+      newId = existingUniqueId;
+    }
+
     uniqueIdVsSubject.put(newId, subject);
-    logger.debug("Subject of {} added.", newId);
+    logger.info("Subject of {} added.", newId);

Review comment:
       Do we want this to always log? It was debug before.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org