public Client createClientWithConf(String authMethod) {
    UserGroupInformation ugi;
    try {
      ugi = UserGroupInformation.getLoginUser();
    } catch(IOException e) {
      throw new IllegalStateException("Unable to get current login user: " + e, e);
    }
    if (loginUserHasCurrentAuthMethod(ugi, authMethod)) {
      LOG.debug("Not setting UGI conf as passed-in authMethod of {} = current",
          authMethod);
      return new Client();
    } else {
      LOG.debug("Setting UGI conf as passed-in authMethod of {} != current",
          authMethod);
      Configuration conf = new Configuration();
      conf.set(HADOOP_SECURITY_AUTHENTICATION, authMethod);
      UserGroupInformation.setConfiguration(conf);
      return new Client();
    }
  }
Functions that bridge Thrift's SASL transports to Hadoop's
SASL callback handlers and authentication classes.
HIVE-11378 This class is not directly used anymore.  It now exists only as a shell to be
extended by HadoopThriftAuthBridge23 in 0.23 shims.  I have made it abstract
to avoid maintenance errors.
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/security/HadoopThriftAuthBridge.java