does somebody tested - will authlogic works with oauth-plugin (https://github.com/pelle/oauth-plugin) or not?
相关问题
- Question marks after images and js/css files in ra
- Using :remote => true with hover event
- Eager-loading association count with Arel (Rails 3
- Is there a way to remove IDV Tags from an AIFF fil
- Rails how to handle error and exceptions in model
相关文章
- Right way to deploy Rails + Puma + Postgres app to
- AWS S3 in rails - how to set the s3_signature_vers
- how to call a active record named scope with a str
- How to add a JSON column in MySQL with Rails 5 Mig
- “No explicit conversion of Symbol into String” for
- form_for wrong number of arguments in rails 4
- Rspec controller error expecting <“index”> but
- Factory_girl has_one relation with validates_prese
Authlogic has an add-on that was specifically developed for it, which can be found here.
I'm in the process of getting this to work right now. I just rolled my own using the authlogic methods to make it play nicely. (I'm trying to get a provider working, so the authlogic-oauth doesn't seem right for me)
I'll edit as I go
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.