You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@zookeeper.apache.org by GitBox <gi...@apache.org> on 2020/10/15 08:06:13 UTC

[GitHub] [zookeeper] eolivelli commented on a change in pull request #1504: ZOOKEEPER-3969: Add whoami API and Cli command

eolivelli commented on a change in pull request #1504:
URL: https://github.com/apache/zookeeper/pull/1504#discussion_r505309630



##########
File path: zookeeper-server/src/main/java/org/apache/zookeeper/ZooKeeper.java
##########
@@ -3070,4 +3071,19 @@ private void validateACL(List<ACL> acl) throws KeeperException.InvalidACLExcepti
         }
     }
 
+    /**
+     * Returns comma separated list of users authenticated in the current session
+     *
+     * @return users
+     * @throws InterruptedException when interrupted
+     */
+    public String whoAmI() throws InterruptedException {

Review comment:
       What about returning a simple datastructure ?
   in the future we will be able to return more data probably.
   
   I would like to see something like:
   class ClientInfo {
       String[] users;
       // auth scheme ?
       // other relevant info ?
   }




----------------------------------------------------------------
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.

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