summaryrefslogtreecommitdiff
path: root/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/http/HttpClientFactory.java
diff options
context:
space:
mode:
Diffstat (limited to 'eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/http/HttpClientFactory.java')
-rw-r--r--eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/http/HttpClientFactory.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/http/HttpClientFactory.java b/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/http/HttpClientFactory.java
index 784dbe0e..ac5905ac 100644
--- a/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/http/HttpClientFactory.java
+++ b/eaaf_core_utils/src/main/java/at/gv/egiz/eaaf/core/impl/http/HttpClientFactory.java
@@ -49,6 +49,7 @@ import at.gv.egiz.eaaf.core.exceptions.EaafException;
import at.gv.egiz.eaaf.core.impl.credential.EaafKeyStoreFactory;
import at.gv.egiz.eaaf.core.impl.credential.KeyStoreConfiguration.KeyStoreType;
import at.gv.egiz.eaaf.core.impl.data.Pair;
+import at.gv.egiz.eaaf.core.impl.http.interceptor.PreemptiveAuthInterceptor;
import lombok.extern.slf4j.Slf4j;
@Slf4j
@@ -305,6 +306,13 @@ public class HttpClientFactory implements IHttpClientFactory {
log.info("Basic http authentication was injected with username: {}",
httpClientConfig.getUsername());
+ if (httpClientConfig.isEnablePreEmptiveHttpBasicAuth()) {
+ log.info("Inject pre-emptive HTTP Basic-Auth interceptor for client: {}",
+ httpClientConfig.getFriendlyName());
+ builder.addInterceptorFirst(new PreemptiveAuthInterceptor());
+
+ }
+
} else {
log.trace("Injection of Http Basic authentication was skipped");