2011-11-30 90 views
2

我想使用oauth來保護我的web應用程序的API。我搜了很多&最後決定嘗試下面的鏈接http://stakeventures.com/articles/2007/11/26/how-to-turn-your-rails-site-into-an-oauth-provider。 我按照步驟&我能夠成功註冊新的應用程序。 我正在使用設計進行身份驗證& pelle的oauth-plugin與兼容acts_as_authenticated,restful_authentication或restful_openid_authentication正如上面的帖子中提到的。 所以,我收到以下錯誤,當我嘗試運行http://localhost:3000/oauth/autherize使用oauth-plugin(pelle)實現oauth提供程序時出錯

NameError (undefined local variable or method `login_required' for #<OauthController:0xc410490>): 

我搜索的解決方案&我得到了下面的鏈接http://groups.google.com/group/oauth-ruby/browse_thread/thread/3656e3904050fd9a

現在有任何其他解決方案,除了上面提到的鏈接。如果是,那麼請指導我關於那&如果不是那麼請告訴我如何實際執行該解決方案。 oauth_controller_spec.rb文件實際在哪裏?我需要爲&編輯插件嗎?

回答