private void injectToken(HttpUriRequest method, AuthenticatedURL.Token token) {
    String t = token.toString();
    if (t != null) {
      if (!t.startsWith("\"")) {
        t = "\"" + t + "\"";
      }
      method.addHeader(COOKIE, AUTH_COOKIE_EQ + t);
    }
  }
Helper method that injects an authentication token to send with the method.
@param method method to inject the authentication token into.
@param token  authentication token to inject.
hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/client/Client.java