public String getUsername() {
    return getContext().getUsername();
  }
Class for Ambari to impersonate users over HTTP request.
This is handy for Views like Jobs that needs to query ATS via HTTP Get requests and
impersonate the currently logged on user.
Or a file browser view that needs to use WebHDFS with the credentials of the current user.
ambari-server/src/main/java/org/apache/ambari/server/view/HttpImpersonatorImpl.java