@@ -633,17 +633,17 @@ private static HttpClientBuilder setupProxy(HttpClientBuilder httpClientbuilder,
633633 String password = null ;
634634 if (config .proxyConfiguration () != null ) {
635635 proxyHost = config .proxyConfiguration ().getHost ();
636- if (config .proxyConfiguration ().getProxyCredentialsProvider () != null &&
637- config .proxyConfiguration ().getProxyCredentialsProvider () instanceof io .split .client .dtos .BasicCredentialsProvider ) {
638- io .split .client .dtos .BasicCredentialsProvider basicAuth =
639- (io .split .client .dtos .BasicCredentialsProvider ) config .proxyConfiguration ().getProxyCredentialsProvider ();
640- userName = basicAuth .getUsername ();
641- password = basicAuth .getPassword ();
642- }
643- if ( config . proxyConfiguration (). getProxyCredentialsProvider () instanceof io . split . client . dtos . BearerCredentialsProvider ) {
644- _log . debug ( "Proxy setup using Bearer token" );
645- httpClientbuilder . setDefaultCredentialsProvider ( new HttpClientDynamicCredentials (
646- ( BearerCredentialsProvider ) config . proxyConfiguration (). getProxyCredentialsProvider ()));
636+ if (config .proxyConfiguration ().getProxyCredentialsProvider () != null ) {
637+ if ( config .proxyConfiguration ().getProxyCredentialsProvider () instanceof io .split .client .dtos .BasicCredentialsProvider ) {
638+ io .split .client .dtos .BasicCredentialsProvider basicAuth =
639+ (io .split .client .dtos .BasicCredentialsProvider ) config .proxyConfiguration ().getProxyCredentialsProvider ();
640+ userName = basicAuth .getUsername ();
641+ password = basicAuth .getPassword ();
642+ } else if ( config . proxyConfiguration (). getProxyCredentialsProvider () instanceof io . split . client . dtos . BearerCredentialsProvider ) {
643+ _log . debug ( "Proxy setup using Bearer token" );
644+ httpClientbuilder . setDefaultCredentialsProvider ( new HttpClientDynamicCredentials (
645+ ( BearerCredentialsProvider ) config . proxyConfiguration (). getProxyCredentialsProvider ()));
646+ }
647647 }
648648 } else {
649649 proxyHost = config .proxy ();
@@ -657,7 +657,7 @@ private static HttpClientBuilder setupProxy(HttpClientBuilder httpClientbuilder,
657657 httpClientbuilder .setRoutePlanner (routePlanner );
658658
659659 if (userName != null && password != null ) {
660- _log .debug ("Proxy setup using credentials " );
660+ _log .debug ("Proxy setup using Basic authentication " );
661661 BasicCredentialsProvider credsProvider = new BasicCredentialsProvider ();
662662 AuthScope siteScope = new AuthScope (proxyHost .getHostName (), proxyHost .getPort ());
663663 Credentials siteCreds = new UsernamePasswordCredentials (userName ,
0 commit comments