Changes

Auth Module

208 bytes added, 18:10, 20 January 2011
m
no edit summary
=== Auth Module ===
The following files makeup the Auth module to extend the functionality of Authlogic for our purposes. They could probably be moved into the UserSession module, but may be useful as a template for further localization.
==== lib/auth/acts_as_authentic.rb ====
'''ActsAsAuthentic''' extends the authlogic user model to ignore passwords, reset_persistence_token when the username changes, manage stale data (via refreshed_at date), and handle user attributes hash.
==== lib/auth/session.rb ====
'''Session''' establishes the following Auth module callback functionsand can serve as a template for further localizations.Callback functions to be overridden locally as appropriate:# '''before_login'''- called when a new user session is being established, before the actual login is called# '''after_loginlogin_url'''# '''before_logout''- called if before_login isn't defined or returns false, convenience method for redirecting to an external login url# '''after_logoutafter_login'''- called after login user has been validated, provides mechanism for authorization# '''on_every_requestbefore_logout''' Also establishes two public methods for setting external login and logout urls.- called before current user session is destroyed# '''login_urlafter_logout'''- called after current user session is destroyed# '''logout_urlon_every_request''' The after_login callback is a bit of a hack since it only runs when the controller action is "validate." - called on every request It also has private methods validate_url (for sending to external logins) and session_user (for setting the session_user attributes).
== Generating Local UmlautAuth Plugins ==
58
edits