@GET
  @Path("/getCurrentUserName")
  public Response getCurrentUserName() {

    JSONObject obj = new JSONObject();

    obj.put("username", viewContext.getUsername());

    return Response.ok(obj).build();
  }
This is a class used to bridge the communication between the and the Oozie
API executing inside ambari.
contrib/views/wfmanager/src/main/java/org/apache/oozie/ambari/view/OozieProxyImpersonator.java