Return-Path: Delivered-To: apmail-hc-httpclient-users-archive@www.apache.org Received: (qmail 1077 invoked from network); 30 Oct 2009 15:43:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 30 Oct 2009 15:43:56 -0000 Received: (qmail 78177 invoked by uid 500); 30 Oct 2009 15:43:56 -0000 Delivered-To: apmail-hc-httpclient-users-archive@hc.apache.org Received: (qmail 78137 invoked by uid 500); 30 Oct 2009 15:43:55 -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 78127 invoked by uid 99); 30 Oct 2009 15:43:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Oct 2009 15:43:55 +0000 X-ASF-Spam-Status: No, hits=-2.0 required=5.0 tests=BAYES_00,RCVD_IN_SORBS_WEB X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of valentin.po@gmail.com designates 72.14.220.153 as permitted sender) Received: from [72.14.220.153] (HELO fg-out-1718.google.com) (72.14.220.153) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Oct 2009 15:43:53 +0000 Received: by fg-out-1718.google.com with SMTP id 16so785638fgg.16 for ; Fri, 30 Oct 2009 08:43:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:content-type:mime-version :subject:from:in-reply-to:date:content-transfer-encoding:message-id :references:to:x-mailer; bh=JsjDEwdyqpG3UXlzB3z2l8t+Agb/AvSfarkzoogBIhM=; b=ot7wXx1or9KH9LCdUd2zb/hUCgyyedbz/3VEYYOB3rcWQrpowD2MAfnLEF0zF+vxgg z0uWSO96vr8cqGIiAk4m6uwla3sjdVPh5IY58C1mGf8D4IrHHzrJv/BzrWT7Eo3v0ss3 odFdDotYYIdDKgYM3jTIlr9kT+kudhaiAY7C4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=content-type:mime-version:subject:from:in-reply-to:date :content-transfer-encoding:message-id:references:to:x-mailer; b=nISqLA+qRsqgLcxi4s4SOLtDUVLuz/zL5DI98eWAgTEWhGpYSUJt+/Dd19YD3i9xnY MtkQ1qZyCZ28AYnESD6CQsATwb/qDdepjTzNAMc1WdFIWmfg5cmtZlhtpQMhjc7uNls8 l9eAXOslqBOcQqnuTpxb3S6GVC/8qb2FY1CC4= Received: by 10.86.231.5 with SMTP id d5mr1152695fgh.53.1256917411955; Fri, 30 Oct 2009 08:43:31 -0700 (PDT) Received: from ?192.168.16.33? (93-80-73-6.broadband.corbina.ru [93.80.73.6]) by mx.google.com with ESMTPS id l19sm539312fgb.26.2009.10.30.08.43.31 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 30 Oct 2009 08:43:31 -0700 (PDT) Content-Type: text/plain; charset=koi8-r; format=flowed; delsp=yes Mime-Version: 1.0 (Apple Message framework v1076) Subject: Re: NTLM authentication using JCIFS with HttpClient 3.1 From: Valentin Popov In-Reply-To: <820950.30605.qm@web8503.mail.in.yahoo.com> Date: Fri, 30 Oct 2009 18:43:29 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: References: <820950.30605.qm@web8503.mail.in.yahoo.com> To: "HttpClient User Discussion" X-Mailer: Apple Mail (2.1076) Yes =F3 =F5=D7=C1=D6=C5=CE=C9=C5=CD, =F7=C1=CC=C5=CE=D4=C9=CE =F0=CF=D0=CF=D7 30.10.2009, =D7 18:39, arpita dhundia =CE=C1=D0=C9=D3=C1=CC(=C1): > Ok. Is "smallbusiness.local" the domain under which the user is =20 > being authenticated? > > Regards, > Arpita > > --- On Fri, 30/10/09, Valentin Popov wrote: > > From: Valentin Popov > Subject: Re: NTLM authentication using JCIFS with HttpClient 3.1 > To: "HttpClient User Discussion" > Date: Friday, 30 October, 2009, 8:47 PM > > I use it like > > Credentials creds =3D new NTCredentials("Administrator", "test", =20 > "192.168.1.2", "smallbusiness.local"); > > > > Regards > Valentin > > > > > 30.10.2009, =D7 18:12, arpita dhundia =CE=C1=D0=C9=D3=C1=CC(=C1): > >> Thanks for your reply Valentin. >> >> I have already tried this basic implementation and it returns =20 >> "Failure authenticating with NTLM @62.92.72.125:80" to me. >> I dont understand why does it have any realm in it, while I am =20 >> explicitly passing the domain to auntheticate in (for NTLM the =20 >> authentication domain is treated as Realm, right?) >> >> I tried using jcifs with httpclient 4.0 and it works, but I need to =20= >> use the commons API for some other purpose hence now I am trying to =20= >> use JCIFS with commons HTTPClient API. >> >> >> Regards, >> Arpita >> >> >> >> Happiness is the result of being >> >> too busy to be unhappy....!!! >> >> Best Wishes >> >> Arpita >> >> --- On Fri, 30/10/09, Valentin Popov wrote: >> >> From: Valentin Popov >> Subject: Re: NTLM authentication using JCIFS with HttpClient 3.1 >> To: "HttpClient User Discussion" >> Date: Friday, 30 October, 2009, 7:19 PM >> >> private HttpClient newClient(String uri, int hostConnectionNumber) =20= >> throws HttpException, IOException{ >> >> Protocol.registerProtocol("https", new Protocol=20 >> ("https", (ProtocolSocketFactory) new EasySSLProtocolSocketFactory=20 >> (), 443)); >> >> >> HostConfiguration hostConfig =3D new = HostConfiguration(); >> hostConfig.setHost(uri); >> >> HttpConnectionManager connectionManager =3D new =20 >> MultiThreadedHttpConnectionManager(); >> HttpConnectionManagerParams params =3D new =20 >> HttpConnectionManagerParams(); >> int maxHostConnections =3D hostConnectionNumber; >> params.setMaxConnectionsPerHost(hostConfig, =20 >> maxHostConnections); >> connectionManager.setParams(params); >> >> HttpClient client =3D new HttpClient(connectionManager); >> client.getHostConfiguration().setHost=20 >> ("smallbusiness.local", 80, "http"); >> client.getParams().setCookiePolicy=20 >> (CookiePolicy.BROWSER_COMPATIBILITY); >> client.setHostConfiguration(hostConfig); >> Credentials creds =3D new NTCredentials=20 >> (ExchangeStubbingWD.adminName, ExchangeStubbingWD.adminPassword, =20 >> ExchangeStubbingWD.serverIP, ExchangeStubbingWD.domainName); >> client.getState().setCredentials(AuthScope.ANY, creds); >> >> return client; >> >> } >> >> Regards >> Valentin >> >> >> >> >> >> 30.10.2009, =D7 16:47, arpita dhundia =CE=C1=D0=C9=D3=C1=CC(=C1): >> >>> >>> Hello people, >>> >>> I am running into an issue using NTLM authentication with commons =20= >>> HttpClient 3.1. I have tried using JCIFS lib with HttpClient 4.0 =20 >>> for ntlm authentication and its works well. >>> But now I am trying to use JCIFS with commons HttpClient 3.1 API.. =20= >>> Any idea how can I do that? >>> >>> Thanks, >>> Arpita >>> >>> >>> >>> Try the new Yahoo! India Homepage. Click here. = http://in.yahoo.com/trynew >> >> >> >> >> Try the new Yahoo! India Homepage. Click here. = http://in.yahoo.com/trynew > > > > > Now, send attachments up to 25MB with Yahoo! India Mail. Learn =20= > how. http://in.overview.mail.yahoo.com/photos --------------------------------------------------------------------- To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org For additional commands, e-mail: httpclient-users-help@hc.apache.org