1

Rails に 2 本足の OAuth プロバイダーを実装しようとしています。

コンシューマーとプロバイダーをインストールするには、次の手順に従いました。

https://github.com/pelle/oauth-plugin

これらの指示を使用して、消費者を機能させる

Rails3 - oauth-plugin の問題

ユーザーログインを実装するためのこれらの命令

https://github.com/plataformatec/devise

そして、これらの方法を使用して接続をテストしました

http://oauth.rubyforge.org/rdoc/classes/OAuth/Consumer.html

二本足の戦略を実装するためにこれらの指示に従いました

Rails の 2 本足の OAuth プロバイダー?

しかし、消費者側では私は得る

  Completed 500 Internal Server Error in 86ms
  OAuth::Unauthorized (401 Unauthorized ):
  oauth (0.4.7) lib/oauth/consumer.rb:216:in `token_request'
  oauth (0.4.7) lib/oauth/consumer.rb:136:in `get_request_token'
  ...

そしてサーバー側で

Started POST "/oauth/request_token" for 127.0.0.1 at Sun Jan 06 22:02:08 -0300 2013
Processing by OauthController#request_token as */*
  Rendered text template (0.0ms)
Filter chain halted as #   <OAuth::Controllers::ApplicationControllerMethods::Filter:0x1111e0e80 @strategies=[:two_legged], @options={:interactive=>false, :strategies=>:two_legged}> rendered or redirected
Completed 401 Unauthorized in 3ms (Views: 2.1ms | ActiveRecord: 0.0ms)

この投稿は同じ問題を指しているようです

https://github.com/pelle/oauth-plugin/issues/106

ネイティブ Android アプリから Rails アプリにログインできるように、2 本足の実装を使用しています。

この投稿は私の問題に関連しているようです

Rails Oauth: request_token を取得できず、フィルター チェーンが停止しました

サーバー側でより詳細なログを取得する場所や取得方法がわかりません。

どんな助けでも大歓迎です。ありがとう!

4

0 に答える 0