Article View: borland.public.cppbuilder.internet.socket
Article #313C++ Builder 2007 & Indy10 + Digest auth...
From: Jyrki Saario
Date: Mon, 14 Apr 2008 12:35
Date: Mon, 14 Apr 2008 12:35
47 lines
2449 bytes
2449 bytes
Hi,
there is being lot questions about digest authentication on this group
and here is one thread more.
I have read trough many previous threads, but have not found solution to
my problem.
I just updated latest Indy10 today, so it should be up to date. (Except
i can not find components from Tool Palette anymore, but projects where
I have used components, can be compiled... anyway, that other story...)
I try to connect to server what uses Digest authentication to download
page under URL: http://192.168.0.10/rmt/index.shtml
When I run my program, I will get exception HTTP/1.0 401 Unauthorized access
Here is more details of my program:
One button with code:
TMemoryStream *stream;
stream = new TMemoryStream( );
HTTP->Request->Username = "user";
HTTP->Request->Password = "testpass";
HTTP->Get("http://192.168.0.10/rmt/index.shtml", stream);
stream->Position = 0;
stream->SaveToFile(DirPathEdit->Text + "\Test.html");
stream->Free();
From TIdHTTP component, I have set:
hoInProcessAuth = true;
BasicAuthentication = false;
in HTTPSelectAuthorization event, I can find this information from
AuthInfo->Text:
Digest realm="WebPage Configuration",
nonce="MDAwMDAwMDA2MDo1MzQ6MTkyLjE2OC4yMzAuMjUz", algorithm=MD5,
domain="Agent: Mozilla/3.0 (compatible; Indy Library)", qop="auth"
And AuthenticationClass->ClassName() shows:
TIdDigestAuthentication
What is wrong, what do I need to do to get this work?
Do I need to make MD5 of password my self?
Thank you for all in advanced!
J.S
Technical Details
Message-ID:
<48035008@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 11508e,d2c1cbe3fa01c,start X-Google-Attributes: gid11508e,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Date: Mon, 14 Apr 2008 15:35:01 +0300 From: Jyrki Saario <user@domain.invalid> User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.internet.socket Subject: C++ Builder 2007 & Indy10 + Digest auth... Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 213.28.123.2 Message-ID: <48035008@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1208176648 213.28.123.2 (14 Apr 2008 05:37:28 -0700) Lines: 47 Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail