AuthUtil (Apache ZooKeeper - Server 3.7.0 API)
Date: 2021-03-17

org.apache.zookeeper.server.util

## Class AuthUtil

- java.lang.Object
- - org.apache.zookeeper.server.util.AuthUtil

-     public final class AuthUtil
      extends Object

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static List<ClientInfo>` | `getClientInfos(List<Id> authInfo)` Gets user from id to prepare ClientInfo.
    `static String` | `getUser(Id id)` Gives user name
    `static String` | `getUsers(List<Id> authInfo)` Returns a formatted, comma-separated list of the user IDs held in `authInfo`, or `null` if no user IDs were found.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### getUser

          public static String getUser(Id id)

      Gives user name
      Parameters:
        `id` - contains scheme and authentication info
      Returns:
        returns null if authentication scheme does not exist or authentication provider returns null as user

    - #### getUsers

          public static String getUsers(List<Id> authInfo)

      Returns a formatted, comma-separated list of the user IDs held in `authInfo`, or `null` if no user IDs were found. Note that while the result may be easy on the eyes, it is underspecified: it does not mention the corresponding `scheme`, nor are its components escaped. It is intended for for logging, and is not a security feature.
      Parameters:
        `authInfo` - A list of `Id` objects, or `null`.
      Returns:
        a comma-separated list of user IDs, or `null` if no user IDs were found.

    - #### getClientInfos

          public static List<ClientInfo> getClientInfos(List<Id> authInfo)

      Gets user from id to prepare ClientInfo.
      Parameters:
        `authInfo` - List of id objects. id contains scheme and authentication info
      Returns:
        list of client authentication info

Copyright © 2008–2021 The Apache Software Foundation. All rights reserved.