"be consistent" | |
PerlMonks |
Re: HTTP basic authentication in SOAP::Liteby Corion (Patriarch) |
on Apr 03, 2009 at 07:40 UTC ( [id://755195]=note: print w/replies, xml ) | Need Help?? |
Note: I haven't done anything with SOAP::Lite. It seems that SOAP::Transport::HTTP is using LWP::UserAgent under the hood, which would explain the double-request approach, because that's what LWP::UserAgent does if you're not specific enough in supplying your credentials. The first and possibly simplest approach to fixing this would be to include the credentials in the URL, that is http://${USER}:${PASS}@webservices.xxxxx.com. This is possibly less than ideal if the URL is visible somewhere. The next approach would be not to use SOAP::Transport::HTTP::Client::get_basic_credentials but to use the credentials method to set the credentials for the hostname. I don't know if you can get at the client instance that SOAP::Lite will use - this would be preferrable to overriding the credentials method in SOAP::Transport::HTTP::Client.
In Section
Seekers of Perl Wisdom
|
|