Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Net::OAuth and POST data

by Anonymous Monk
on Apr 16, 2015 at 23:10 UTC ( #1123678=note: print w/replies, xml ) Need Help??


in reply to Net::OAuth and POST data

https://metacpan.org/source/SIMONW/Net-OAuth-Simple-1.5/lib/Net/OAuth/Simple.pm does both a ->sign and a ->verify on a request

Replies are listed 'Best First'.
Re^2: Net::OAuth and POST data
by gryphon (Abbot) on Apr 17, 2015 at 16:03 UTC

    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.

      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://1123678]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2020-12-03 00:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How often do you use taint mode?





    Results (49 votes). Check out past polls.

    Notices?