The core of HTTP authentication is the following (you have to put the authentication 
into the HTTP header):

                import httplib
                h=httplib.HTTP(....)
                ....
                h.putheader("AUTHORIZATION", "Basic %s" % string.replace(
                        encodestring("%s:%s" % (self.username, self.password)),
                        "\012", ""))

                ....
there is a xmlrpc howto where you find a detailed description:

http://www.zope.org/Members/Amos/XML-RPC

good luck
phil

*********** REPLY SEPARATOR  ***********

On 06.10.2000 at 14:22 Hung Jung Lu wrote:

>Hi,
>
>Where can I find out more information on HTTP user authentication? I have 
>seen the RFC before, but it's a bit too technical to follow. I think Python 
>does not include the authentication/cookie handling part probably because 
>out of concern about abuses. :)
>
>Does anyone know where I can find more info on the authentication and cookie 
>protocol stuff? Is there any Python module already written to handle these 
>things?
>
>The idea is to be able to fetch external webpages automatically using 
>Python, including providing the necessary auth and cookie info. Of course 
>this opens up a whole can of security worms, but heck, it's open information 
>and someone must already have written something in Python already.
>
>regards,
>
>Hung Jung
>_________________________________________________________________________
>Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
>Share information about yourself, create your own public profile at 
>http://profiles.msn.com.
>
>
>_______________________________________________
>Zope maillist  -  [EMAIL PROTECTED]
>http://lists.zope.org/mailman/listinfo/zope
>**   No cross posts or HTML encoding!  **
>(Related lists - 
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )




_______________________________________________
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to