public String getPassword(HttpServletRequest request) throws HttpAuthenticationException {
    // If the request contains password parameter, return its value
    String passwordParam = request.getParameter(PASSWORD_REQUEST_PARAM_NAME);
    if (passwordParam != null && !passwordParam.isEmpty()) {
      return passwordParam;
    }
    // If the request contains password parameter, return its value
    String authHeaderDecodedString = getAuthHeaderDecodedString(request);
    String[] credentials = authHeaderDecodedString.split(":", 2);
    if (credentials.length < 2 || credentials[1] == null || credentials[1].isEmpty()) {
      throw new HttpAuthenticationException("Authorization header received from the client does not contain password.");
    }
    return credentials[1];
  }
Retrieves password from http request
@param request The HTTP Servlet Request send by the client
@return String containing password
service/src/java/org/apache/hive/service/auth/HttpAuthService.java