good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Ok I'm stumped. How the heck does LWP::Authen::Wsse work?by jaldhar (Vicar) |
on Apr 29, 2011 at 03:18 UTC ( [id://901913]=perlquestion: print w/replies, xml ) | Need Help?? |
jaldhar has asked for the wisdom of the Perl Monks concerning the following question: I'm writing a script that uses WWW::Mechanize. I need to do basic and WSSE UserToken authentication. The former is easy. For the latter I found LWP::Authen:Wsse on CPAN. WWW::Mechanize is a subclass of LWP::UserAgent so I should be able to use it right? Only, I can't figure out how. Here is some sample code:
Note that no method from LWP::Authen::Wsse is called in the script. That's because according to the modules' documentation: The module is used indirectly through LWP, rather than including it directly in your code. The LWP system will invoke the WSSE authentication when it encounters the authentication scheme while attempting to retrieve a URL from a server. I think this is where I'm going wrong. Is the server supposed to send a special header asking for WSSE authentication like it does for Basic Auth? Or does LWP::Auth::Wsse (which only has one method called authenticate) have to be injected into a WWW::Mechanize object somehow? I see that LWP::UserAgent in the request() method has a hook to call authenticate() but I can't seem to get from A to B. Help! --
Back to
Seekers of Perl Wisdom
|
|