Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Jun : Re: Using TIdDigestAuthentication
| Subject: | Re: Using TIdDigestAuthentication |
| Posted by: | "Remy Lebeau (TeamB)" (no.spam@no.spam.com) |
| Date: | Fri, 9 Jun 2006 11:19:59 |
"Kees Vermeulen" <info@kever.com> wrote in message
news:448979d9@newsgroups.borland.com...
> I'm trying to connect to a proxy server using 'Digest'
> authentication. I have the following code setup:
You don't need to use the OnSelectProxyAuthorization event. Just including
IdAuthenticationDigest in your uses clause is enough.
TIdDigestAuthentication is automatically registered into a global list that
TIdHTTP uses when parsing the headers of proxy responses. If the proxy asks
for 'Digest' authentication, then TIdHTTP will use TIdDigestAuthentication
automatically.
> I used the same code with 'Basic' authorisation successfully
> (except then TIdBasicAuthentication class was returned for
> AuthenticationClass).
You shouldn't be doing that, either. TIdBasicAuthentication is also used
automatically. The only time you should ever use the
OnSelectProxyAuthorization event is when you write your own custom
TIdAuthentication class and don't call RegisterAuthenticationMethod().
Gambit
none