开发者

OAuth "nested" params

开发者 https://www.devze.com 2023-04-09 23:09 出处:网络
The problem with the Ruby library OAuth (0.4.5) when I use a \"nested\" params in the query. Example: That does开发者_StackOverflow社区 not work that request

The problem with the Ruby library OAuth (0.4.5) when I use a "nested" params in the query.

Example:

That does开发者_StackOverflow社区 not work that request

current_user.myapp.client.post('/api/weights', {"weight[value]"=> 65})

I got

---! Ruby / object: Net:: HTTPUnauthorized
body:! str
   str: Invalid OAuth Request
   "@ _rails_html_safe": false
body_exist: true
code: "401"

And this is working

current_user.myapp.client.post('/api/weights', {:weight => {:value => 65})

But the params do not come correct:

Parameters: {"weight" => "value65"}


Fixed this bug https://github.com/oauth/oauth-ruby/pull/35

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号