private static Token<AuthenticationTokenIdentifier> getAuthToken(Connection conn, User user)
    throws IOException {
    final String clusterId = conn.getClusterId();
    if (clusterId == null) {
      throw new IOException("Failed to get cluster ID");
    }
    return new AuthenticationTokenSelector().selectToken(new Text(clusterId), user.getTokens());
  }
Get the authentication token of the user for the cluster specified in the configuration
@return null if the user does not have the token, otherwise the auth token for the cluster.
hbase-server/src/main/java/org/apache/hadoop/hbase/security/token/TokenUtil.java