public static void obtainAndCacheToken(final Connection conn, User user)
    throws IOException, InterruptedException {
    ClientTokenUtil.obtainAndCacheToken(conn, user);
  }
See {@link ClientTokenUtil#obtainAndCacheToken(Connection, User)}.
hbase-server/src/main/java/org/apache/hadoop/hbase/security/token/TokenUtil.java