On Thu, 2011-09-08 at 12:36 -0700, Michael Remijan wrote: > Do you call > > httpclient.getCredentialsProvider().setCredentials(..) > > multiple times then for however many credentials you have? > >
Absolutely. HttpClient will make use of them as needed. Oleg > > > > > > ________________________________ > From: Oleg Kalnichevski <[email protected]> > To: Michael Remijan <[email protected]> > Cc: HttpClient User Discussion <[email protected]> > Sent: Thursday, September 8, 2011 2:11 PM > Subject: Re: Confused about target host and proxy authentication > > On Thu, 2011-09-08 at 11:30 -0700, Michael Remijan wrote: > > > > I'm sorry, I forgot to include that information... > > > > <dependency> > > <groupId>org.apache.httpcomponents</groupId> > > <artifactId>httpclient</artifactId> > > <version>4.1.2</version> > > </dependency> > > > > > > Then, I am not sure I understand the problem. All you have to do is to > configure the auth credentials provider with two sets of credentials > (one or target server and another one for the proxy) as described here > [1] and HttpClient will take care of the rest. > > Oleg > > [1] > http://hc.apache.org/httpcomponents-client-ga/tutorial/html/authentication.html#d4e971 > > > > > > > > > ________________________________ > > From: Oleg Kalnichevski <[email protected]> > > To: Michael Remijan <[email protected]> > > Cc: HttpClient User Discussion <[email protected]> > > Sent: Thursday, September 8, 2011 1:22 PM > > Subject: Re: Confused about target host and proxy authentication > > > > On Thu, 2011-09-08 at 10:15 -0700, Michael Remijan wrote: > > > I am working in an environment where I need to specify a proxy as well as > > > login to the proxy. After I have the connection to the proxy, I then > > > need to also provide BASIC authentication to target host I'm contacting. > > > I'm confused how to do this configuration. I have followed the examples > > > and I know how to get a non-authenticating proxy to work and I have also > > > followed the examples to provide BASIC authentication to my target host. > > > In my case the usernames/passwords for both are different so I'm confused > > > how to provide authenticating information for the proxy as well. Any > > > help would be appreciated. > > > > What version of HttpClient are you using? > > > > Oleg > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [email protected] > > For additional commands, e-mail: [email protected] > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
