Authentication for XML-RPC Calls

whitemice adamtaunowilliams at gmail.com
Tue Jul 22 13:31:03 EDT 2008


The only documentation regarding doing authentication for XML-RPC I
can find is -

"Both the HTTP and HTTPS transports support the URL syntax extension
for HTTP Basic Authentication: http://user:pass@host:port/path. The
user:pass portion will be base64-encoded as an HTTP `Authorization'
header, and sent to the remote server as part of the connection
process when invoking an XML-RPC method. You only need to use this if
the remote server requires a Basic Authentication user and password."

- from http://docs.python.org/lib/module-xmlrpclib.html

Is this really the only way to do authentication for XML-RPC calls?

Like this:
server = xmlrpclib.Server('http://adam:fred123@localhost/zidestore/so/
adam/'

This works, but is pretty ugly.  Is there no way to setup the
authentication through properties (like in most XML-RPC bindings),
like:

server = xmlrpclib.Server('http://localhost/zidestore/so/adam/'
server.Username = 'adam'
server.Password = 'fred123'



More information about the Python-list mailing list