private String getClientDelegationToken(Map<String, String> jdbcConnConf) throws SQLException {
    String tokenStr = null;
    if (!JdbcConnectionParams.AUTH_TOKEN.equalsIgnoreCase(jdbcConnConf.get(JdbcConnectionParams.AUTH_TYPE))) {
      return null;
    }
    DelegationTokenFetcher fetcher = new DelegationTokenFetcher();
    try {
      tokenStr = fetcher.getTokenStringFromFile();
    } catch (IOException e) {
      LOG.warn("Cannot get token from environment variable $HADOOP_TOKEN_FILE_LOCATION=" +
              System.getenv(UserGroupInformation.HADOOP_TOKEN_FILE_LOCATION));
    }
    if (tokenStr == null) {
      try {
        return fetcher.getTokenFromSession();
      } catch (IOException e) {
        throw new SQLException("Error reading token ", e);
      }
    }
    return tokenStr;
  }
Create transport per the connection options
Supported transport options are:
  - SASL based transports over
     + Kerberos
     + Delegation token
     + SSL
     + non-SSL
  - Raw (non-SASL) socket

  Kerberos and Delegation token supports SASL QOP configurations
@throws SQLException, TTransportException
jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java