Hi all does somebody tested - will authlogic works with oauth-plugin (https://github.com/pelle/oauth-plugin) or not?
Authlogic has an add-on that was specifically developed for it, which can be found here.
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_required
class 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_required
method 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.