Return-Path: X-Original-To: apmail-hc-httpclient-users-archive@www.apache.org Delivered-To: apmail-hc-httpclient-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CE93F7DE6 for ; Thu, 8 Sep 2011 21:57:15 +0000 (UTC) Received: (qmail 30860 invoked by uid 500); 8 Sep 2011 21:57:15 -0000 Delivered-To: apmail-hc-httpclient-users-archive@hc.apache.org Received: (qmail 30646 invoked by uid 500); 8 Sep 2011 21:57:14 -0000 Mailing-List: contact httpclient-users-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpClient User Discussion" Delivered-To: mailing list httpclient-users@hc.apache.org Received: (qmail 30638 invoked by uid 99); 8 Sep 2011 21:57:14 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Sep 2011 21:57:14 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [92.42.190.144] (HELO ok2cons2.nine.ch) (92.42.190.144) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Sep 2011 21:57:06 +0000 Received: from [192.168.1.102] (77-57-197-206.dclient.hispeed.ch [77.57.197.206]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ok2cons2.nine.ch (Postfix) with ESMTPSA id 9EE79245E488; Thu, 8 Sep 2011 23:56:45 +0200 (CEST) Subject: Re: Confused about target host and proxy authentication From: Oleg Kalnichevski To: Michael Remijan Cc: HttpClient User Discussion In-Reply-To: <1315510564.11932.YahooMailNeo@web34407.mail.mud.yahoo.com> References: <29EFE2FE4F2D544EB1345BE3C0F899A2AB87D0C1@USTLCDBG002.US.DB.COM> <29EFE2FE4F2D544EB1345BE3C0F899A2AB87D211@USTLCDBG002.US.DB.COM> <1315498055.17228.113.camel@ubuntu> <29EFE2FE4F2D544EB1345BE3C0F899A2AB87D3DF@USTLCDBG002.US.DB.COM> <1315502148.86897.YahooMailNeo@web34402.mail.mud.yahoo.com> <1315506144.17228.126.camel@ubuntu> <1315506656.6225.YahooMailNeo@web34406.mail.mud.yahoo.com> <1315509117.17228.130.camel@ubuntu> <1315510564.11932.YahooMailNeo@web34407.mail.mud.yahoo.com> Content-Type: text/plain; charset="UTF-8" Date: Thu, 08 Sep 2011 23:57:32 +0200 Message-ID: <1315519052.17228.131.camel@ubuntu> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Content-Transfer-Encoding: 7bit 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 > To: Michael Remijan > Cc: HttpClient User Discussion > 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... > > > > > > org.apache.httpcomponents > > httpclient > > 4.1.2 > > > > > > > > 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 > > To: Michael Remijan > > Cc: HttpClient User Discussion > > 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