On Tue, Nov 8, 2011 at 7:56 PM, Mark Farver <mark.f(a)directi.com> wrote:
On Tue, Nov 8, 2011 at 6:42 PM, James Cammarata <jimi(a)sngx.net>
wrote:
> Don't pass the username/password in via the URL, just use the remote
> function login(username,password) instead.
If I don't pass username and password on the URL the call fails with a
401. (Which seems logical.)
Can the webui and API have different authentication providers/modules?
Are you still using authn_passthru? If so, it won't work, you need to
use one of the other modules.
Using the configfile one, it works fine for me:
>> import xmlrpclib
>> remote = xmlrpclib.Server("http://127.0.0.1/cobbler_api")
>> token = remote.login('cobbler','testing')
>> token
'QXdyOx2ixL81YLyAtdEhmKWku5KqXHLS0Q=='
The API does not use a different authentication method from the webui,
since the webui does everything over XMLRPC the same way essentially
as shown above.