Given all of the login/component controversy, and the multiple
efforts, I’ve really been surprised that no one AFAIK has taken a
module approach to logins / authentication. It seems that the
generator and engines approaches are the way to go.
I assume this mentality is due to the desire to include login pages,
password recovery pages, etc. But what if a plugin usage looked like
this:
class MyUser < ActiveRecord::Base
acts_as_user :login => “username_field”, :password =>
“my_password_field”
use_acl :roles
end
The plugin has no ambitions of handling views, but only doing model
tasks, such as salting the password, and possibly providing access to
roles. Its easy to update (no generated code), and easy to apply
because it doesn’t place any requirements on the schema or views.
Maybe it could also provide:
class MyController < ActionController::Base
authenticate_against :my_user, :except => [“index”, “login”]
end
Goals include simplicity, configurability, no generated code, no view
code, loose coupling to the db schema. Any feedback as to the merits
of the approach?
–
Kyle M.
Chief Technologist
E Factor Media // FN Interactive
[email protected]
1-866-263-3261