public static synchronized HiveSaml2Client get(HiveConf conf)
      throws HttpSamlAuthenticationException {
    if (INSTANCE != null) {
      return INSTANCE;
    }
    try {
      INSTANCE = new HiveSaml2Client(conf);
    } catch (Exception e) {
      throw new HttpSamlAuthenticationException("Could not instantiate SAML2.0 client",
          e);
    }
    return INSTANCE;
  }
HiveServer2's implementation of SAML2Client. We mostly rely on pac4j to do most of the
heavy lifting. This class implements the initialization logic of the underlying {@link
SAML2Client} using the HiveConf. Also, implements the generation of SAML requests using
HTTP-Redirect binding. //TODO: Add support for HTTP-Post binding for SAML request.

//TODO Note that this implementation is only to be used when HiveServer2 is not
deployed in HA mode. In case of HA mode, we should implement a
{@link ReplayCacheProvider} such that the {@link org.opensaml.storage.ReplayCache} is
shared between all HS2 instances. Ref: http://www.pac4j.org/docs/clients/saml.html
service/src/java/org/apache/hive/service/auth/saml/HiveSaml2Client.java