hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: Confused about target host and proxy authentication
Date Thu, 08 Sep 2011 21:57:32 GMT
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 <olegk@apache.org>
> To: Michael Remijan <mjremijan@yahoo.com>
> Cc: HttpClient User Discussion <httpclient-users@hc.apache.org>
> 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 <olegk@apache.org>
> > To: Michael Remijan <mjremijan@yahoo.com>
> > Cc: HttpClient User Discussion <httpclient-users@hc.apache.org>
> > 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: httpclient-users-unsubscribe@hc.apache.org
> > For additional commands, e-mail: httpclient-users-help@hc.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Mime
View raw message