Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re: HTTP basic authentication in SOAP::Lite

by Corion (Pope)
on Apr 03, 2009 at 07:40 UTC ( #755195=note: print w/ replies, xml ) Need Help??

in reply to HTTP basic authentication in SOAP::Lite

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} 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.

Comment on Re: HTTP basic authentication in SOAP::Lite
Select or Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://755195]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2015-11-27 15:10 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (731 votes), past polls