Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brentgreeff/auth_logic_user_session_helper
Bunch of convenience methods for use with AuthLogic and Rails.
https://github.com/brentgreeff/auth_logic_user_session_helper
authentication authlogic
Last synced: about 7 hours ago
JSON representation
Bunch of convenience methods for use with AuthLogic and Rails.
- Host: GitHub
- URL: https://github.com/brentgreeff/auth_logic_user_session_helper
- Owner: brentgreeff
- License: mit
- Created: 2009-07-16T21:50:43.000Z (over 15 years ago)
- Default Branch: master
- Last Pushed: 2011-01-13T09:56:14.000Z (almost 14 years ago)
- Last Synced: 2024-10-18T15:51:11.571Z (about 1 month ago)
- Topics: authentication, authlogic
- Language: Ruby
- Homepage: http://www.brentgreeff.com/rails-plugins/authlogic-usersession-helper
- Size: 97.7 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rdoc
- License: MIT-LICENSE
Awesome Lists containing this project
README
= AuthLogic UserSession Helper
Bunch of convenience methods for use with AuthLogic and Rails.
Only works if you are using a standard user, and user_session.
Will be able to specify the model(s) names in the future
== Install
gem install auth_logic_user_session_helper
(or use bundler)== Example
* Get the current_user from the session
current_user* Is there a user logged in?
user?* Is there no user currently logged in?
no_user?* A user is required! (use as before filter to redirect to '/login')
user_required* A user cannot be logged in (will redirect to the root_url, whatever that is mapped to)
no_user_required* If you need to remember what the user was trying to do before you made them login
store_location
redirect_back_or_default=== user_required will store the requested location before redirecting.
=== Call redirect_back_or_default after login to enable this behaviour.== Testing
Adds login_as and logout methods to tests.
Copyright (c) 2009 [Brent Greeff], released under the MIT license