Class PreemptiveBasicAuthClientCustomizer

java.lang.Object
org.apache.solr.client.solrj.jetty.PreemptiveBasicAuthClientCustomizer
All Implemented Interfaces:
org.apache.solr.client.solrj.impl.SolrClientCustomizer<HttpJettySolrClient>

public class PreemptiveBasicAuthClientCustomizer extends Object implements org.apache.solr.client.solrj.impl.SolrClientCustomizer<HttpJettySolrClient>
A HttpJettySolrClient SolrClientCustomizer supporting a preemptive Http Basic authentication scheme.
See Also:
  • Field Details

    • SYS_PROP_HTTP_CLIENT_CONFIG

      public static final String SYS_PROP_HTTP_CLIENT_CONFIG
      A system property used to specify a properties file containing default parameters used for creating an HTTP client. This is specifically useful for configuring the HTTP basic auth credentials (i.e. username/password). The name of the property must match the relevant Solr config property name.
      See Also:
    • SYS_PROP_BASIC_AUTH_CREDENTIALS

      public static final String SYS_PROP_BASIC_AUTH_CREDENTIALS
      A system property to configure the Basic auth credentials via a java system property. Since this will expose the password on the command-line, it is not very secure. But this mechanism is added for backwards compatibility.
      See Also:
  • Constructor Details

    • PreemptiveBasicAuthClientCustomizer

      public PreemptiveBasicAuthClientCustomizer()
  • Method Details

    • setDefaultSolrParams

      public static void setDefaultSolrParams(org.apache.solr.common.params.SolrParams params)
      This method enables configuring system-wide defaults (apart from using a config file based approach).
    • setup

      public void setup(HttpJettySolrClient client)
      Specified by:
      setup in interface org.apache.solr.client.solrj.impl.SolrClientCustomizer<HttpJettySolrClient>
    • setup

      public void setup(HttpJettySolrClient client, String basicAuthUser, String basicAuthPass)