private String getAuthHeader(HttpServletRequest request) throws HttpAuthenticationException {
      String authHeader = request.getHeader(HttpHeaders.AUTHORIZATION);
      // Each http request must have an Authorization header
      if (authHeader == null || authHeader.isEmpty()) {
        throw new HttpAuthenticationException(
          "Authorization header received " + "from the client is empty.");
      }
      String authHeaderBase64String;
      int beginIndex = (NEGOTIATE + " ").length();
      authHeaderBase64String = authHeader.substring(beginIndex);
      // Authorization header must have a payload
      if (authHeaderBase64String.isEmpty()) {
        throw new HttpAuthenticationException(
          "Authorization header received " + "from the client does not contain any data.");
      }
      return authHeaderBase64String;
    }
Returns the base64 encoded auth header payload
@throws HttpAuthenticationException if a remote or network exception occurs
hbase-thrift/src/main/java/org/apache/hadoop/hbase/thrift/ThriftHttpServlet.java