Class AuthUtil


  • public final class AuthUtil
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.List<ClientInfo> getClientInfos​(java.util.List<Id> authInfo)
      Gets user from id to prepare ClientInfo.
      static java.lang.String getUser​(Id id)
      Gives user name
      static java.lang.String getUsers​(java.util.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 java.lang.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 java.lang.String getUsers​(java.util.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 java.util.List<ClientInfo> getClientInfos​(java.util.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