Class AuthUtils


  • public class AuthUtils
    extends Object
    The AuthUtils class provides helper methods for parsing the HTTP Authorization header.
    • Method Detail

      • getUsername

        public static String getUsername​(String auth)
        Returns the username portion of a Basic Authentication header. Returns null if malformed.
        Parameters:
        auth - The Basic Authentication header.
        Returns:
        The username portion or null if not available.
      • getPassword

        public static String getPassword​(String auth)
        Returns the password portion of a Basic Authentication header. Returns null if malformed.
        Parameters:
        auth - The Basic Authentication header.
        Returns:
        The password portion or null if not available.