Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Oct : Indy 10 - another digest auth problem
| Subject: | Indy 10 - another digest auth problem |
| Posted by: | "Martin James" (nospam@tuthill.com) |
| Date: | Sat, 6 Oct 2007 07:35:10 |
TidAuthorizationDigest needs its 'Uri' property set so as to be able to
correctly send the Authorization header. Unfortunately, it is created by a
class factory using its class type - it is a descendant of
TIdAuthentication and this class takes no parameters. There seems to be no
event or other clean means of setting the 'Uri' property.
The only quick thing I can think of off-hand is a non-oo gruesome hack,
adding IdauthenticationDigest to the idHTTP uses clause and:
ARequest.Authentication := Auth.Create;
if (ARequest.Authentication is TIdDigestAuthentication) then
begin
TIdDigestAuthentication(ARequest.Authentication).Uri:=FURI.Path;
end;
This nastiness allows the URI to appear in the Authorization header.
Perhaps TIdAuthentication should take a 'request' parameter?
Rgds,
Martin