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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to