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

Re: Basic authentication in SOAP

by gellyfish (Monsignor)
on Jul 20, 2006 at 12:46 UTC ( [id://562563]=note: print w/replies, xml ) Need Help??


in reply to Basic authentication in SOAP

You should see the section entitled "HTTP BASIC AUTHENTICATION " in the SOAP::Transport documentation.

Update: fixed the link [module://SOAP::Transport] seems to be broken.

/J\

Replies are listed 'Best First'.
Re^2: Basic authentication in SOAP
by shonorio (Hermit) on Jul 20, 2006 at 12:54 UTC
    Your link is broken, maybe this is correct SOAP::Transport.

    Solli Moreira Honorio
    Sao Paulo - Brazil
Re^2: Basic authentication in SOAP
by Hofmator (Curate) on Jul 20, 2006 at 12:58 UTC
    Your link is leading to 'Not found' for me ... but this one here should point directly at the information you mention.

    -- Hofmator

Re^2: Basic authentication in SOAP
by mrguy123 (Hermit) on Jul 20, 2006 at 12:55 UTC
    Thanks for your (very) quick reply. The section you referred me to contains this info
    BEGIN { sub SOAP::Transport::HTTP::Client::get_basic_credentials { return 'username' => 'password'; } }
    I still don't underdstand from this code how I can send the username and password as part of the SOAP request.

      Where it says 'username', put in the username to login as. Replace 'password' with the appropriate password for the username you're trying to use.

      SOAP::Transport will call this function to get the username and password to log in as, so when you override the function, it'll log in with what you tell it.

        Thanks. I have done what you said. However, I would expect to see something like this in the header when I send my request:
        POST http://newscentre.aap.com.au/SRW/SRW.asmx Authorization: Basic dmljcGFybDJcbWV0YWxpYjo1bmV3c2NlbnRyZTM=
        . Since this is not in the header (or anywher else in the SOAP request), I think that I am missing something. Are you sure this is all that needs to be done?
        I see that I have been down voted twice by now (first time ever), and it probably looks like I want others to do the work for me. I think I should mention that I have been spending a lot of hours in the past few days trying to understand the SOAP::Lite module, which compared to other modules I worked with in the past is not that user friendly (a much longer discussion about this issue can be found here). I'm sorry if the questions aren't that great, but please be patient. Thanks for the help,
        Guy
      You just have to include this code snippet (with username and password replaced of course) in your code using SOAP::Lite. That should do the trick according to the docs.

      Update: Ahrg, you guys are too quick for me :-) ... sorry for the double posts ...

      -- Hofmator

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (2)
As of 2024-04-24 17:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found