Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: HTTP basic authentication in SOAP::Lite

by Corion (Patriarch)
on Apr 03, 2009 at 07:40 UTC ( [id://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}@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.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (2)
As of 2024-04-26 07:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found