Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

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


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

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2014-09-20 15:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (160 votes), past polls