# Class AuthUtil

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

public final class AuthUtil extends Object

## Method Summary

Modifier and Type
Method
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 Object

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

## Method Details

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