public HttpClient build() throws TikaConfigException {
        LOG.info("http client does not verify ssl at this point.  " +
                "If you need that, please open a ticket.");
        TrustStrategy acceptingTrustStrategy = (cert, authType) -> true;
        SSLContext sslContext = null;
        try {
            sslContext =
                    SSLContexts.custom().loadTrustMaterial(
                            null, acceptingTrustStrategy).build();
        } catch (NoSuchAlgorithmException | KeyManagementException | KeyStoreException e) {
            throw new TikaConfigException("", e);
        }
        SSLConnectionSocketFactory sslsf =
                new SSLConnectionSocketFactory(sslContext, NoopHostnameVerifier.INSTANCE);

        Registry<ConnectionSocketFactory> socketFactoryRegistry =
                RegistryBuilder.<ConnectionSocketFactory>create().register("https", sslsf)
                        .register("http", new PlainConnectionSocketFactory()).build();

        PoolingHttpClientConnectionManager manager =
                new PoolingHttpClientConnectionManager(socketFactoryRegistry);
        manager.setDefaultMaxPerRoute(maxConnectionsPerRoute);
        manager.setMaxTotal(maxConnections);

        HttpClientBuilder builder = HttpClients.custom();
        if (disableContentCompression) {
            builder.disableContentCompression();
        }
        addCredentialsProvider(builder);
        addProxy(builder);
        return builder.setConnectionManager(manager)
                .setRedirectStrategy(new CustomRedirectStrategy(allowedHostsForRedirect))
                .setDefaultRequestConfig(RequestConfig.custom().setTargetPreferredAuthSchemes(
                        Arrays.asList(AuthSchemes.BASIC, AuthSchemes.NTLM))
                        .setConnectionRequestTimeout(requestTimeout)
                        .setConnectionRequestTimeout(connectTimeout).setSocketTimeout(socketTimeout)
                        .build()).setKeepAliveStrategy(getKeepAliveStrategy())
                .setSSLSocketFactory(sslsf).setSSLHostnameVerifier(NoopHostnameVerifier.INSTANCE)
                .build();
    }
only basic and ntlm are supported

@param authScheme
tika-pipes/tika-httpclient-commons/src/main/java/org/apache/tika/client/HttpClientFactory.java