does somebody tested – will authlogic works with oauth-plugin (https://github.com/pelle/oauth-plugin) or not?
does somebody tested – will authlogic works with oauth-plugin ( https://github.com/pelle/oauth-plugin ) or not?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The short answer is no. I am currently integrating oauth-plugin‘s service providership with my own auth system (which predates authlogic, acts_as_authenticated and all the rest).
oauth-plugin service providership works by means of a code generator generating two controllers, which are then tied into some library files in the plugin. All of these files expect a
login_requiredclass method with the same semantics that acts_as_authenticated uses.authlogic makes no assumptions about your controllers at all, so it won’t work out of the box with oauth-plugin, however that design decision also means it will be fairly easy to structure your controllers in the expected way. Therefore it should be (maybe trivially) easy to build a shim to support oauth-plugin.
However in my case I’ve decided to run the generator then to extract what I need from the plugin and delete the plugin itself. The primary reason I am doing this is that I explicitly don’t have the
login_requiredmethod in my auth system, so I would have to monkey patch the lib to get it to work. Secondly, there’s a lot of stuff in the plugin I just don’t need. Thirdly, most of the stuff that is truly library-level has already been abstracted into the oauth gem proper, so the stuff living in the oauth-plugin lib directory is in this weird no mans land between the generated code and the actual library.