@Override
  public HttpURLConnection doAs(HttpURLConnection conn, String type)  {
    String username = getUsername();
    return doAs(conn, type, username, ImpersonatorSettingImpl.DEFAULT_DO_AS_PARAM);
  }
@param conn HTTP connection that will be modified and returned
@param type HTTP Request type: GET, PUT, POST, DELETE, etc.
@return HTTP Connection object with the "doAs" query param set to the currently logged on user.
ambari-server/src/main/java/org/apache/ambari/server/view/HttpImpersonatorImpl.java