Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re^2: Net::OAuth and POST data

by gryphon (Abbot)
on Apr 17, 2015 at 16:03 UTC ( #1123785=note: print w/replies, xml ) Need Help??


in reply to Re: Net::OAuth and POST data
in thread Net::OAuth and POST data

Greetings,

So what? Neither Net::OAuth nor Net::OAuth::Simple include POSTDATA in the signing process, as far as I can tell. They include "extra params", but these have to be key/value pairs, not POSTDATA. Ergo, I can't see a way to issue a standard HTTP POST request that's OAuth signed using either module. If I'm wrong, I would love to be proven so with a POSTDATA-signed code sample.

Replies are listed 'Best First'.
Re^3: Net::OAuth and POST data
by Anonymous Monk on Apr 17, 2015 at 23:39 UTC

    Greetings, So what? Neither Net::OAuth nor Net::OAuth::Simple include POSTDATA in the signing process, as far as I can tell.

    Well, https://metacpan.org/source/SIMONW/Net-OAuth-Simple-1.5/examples/twitter appears like it would work, like the author used it and tested it

    So the way Net::OAuth::Simple does things doesn't match the way you try to do it

    Is it supposed to sign POSTDATA? I don't know, but I do know there is stuff in your code that doesn't make sense, and doesn't do anything, see

    do you see that? before/after is no change in the object

    Also, if you try to ->sign just like ::Simple you get an error  Can't locate object method "$content" via package "Net::OAuth::ProtectedResourceRequest" at Net/OAuth/Message.pm line 162.

    update: removing  $oauth->signature_elements( [ @{ $oauth->signature_elements }, $content ] ); no death, and apparently POSTDATA is taken into account somehow (signature is different)

    So what next? I dont know :)

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (6)
As of 2020-10-28 19:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (264 votes). Check out past polls.

    Notices?