From f33643667ae2daf3525be8744fff7e73ef4d7974 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Mon, 4 Feb 2019 07:59:44 +0100 Subject: update http-Proxy injection --- .../egovernment/moa/id/commons/utils/HttpClientWithProxySupport.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/utils/HttpClientWithProxySupport.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/utils/HttpClientWithProxySupport.java index 7121c4a2a..31c66376c 100644 --- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/utils/HttpClientWithProxySupport.java +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/utils/HttpClientWithProxySupport.java @@ -72,8 +72,9 @@ public class HttpClientWithProxySupport { String user = System.getProperty("http.proxyUser"); //$NON-NLS-1$ String pass = System.getProperty("http.proxyPassword"); //$NON-NLS-1$ if (MiscUtil.isNotEmpty(user) && pass != null) { - CredentialsProvider credsProvider = new BasicCredentialsProvider(); - credsProvider.setCredentials(new AuthScope(host, p), new UsernamePasswordCredentials(user, pass)); + CredentialsProvider proxyCredsProvider = new BasicCredentialsProvider(); + proxyCredsProvider.setCredentials(new AuthScope(host, p), new UsernamePasswordCredentials(user, pass)); + clientBuilder.setDefaultCredentialsProvider(proxyCredsProvider); } } -- cgit v1.2.3