Every repository with this icon (
Every repository with this icon (
| name | age | message | |
|---|---|---|---|
| |
LICENSE | Fri Jan 16 12:52:23 -0800 2009 | |
| |
README.markdown | Fri Jan 16 22:24:56 -0800 2009 | |
| |
Rakefile | Fri Jan 16 12:59:13 -0800 2009 | |
| |
TODO | Fri Jan 16 12:52:23 -0800 2009 | |
| |
autotest/ | Fri Jan 16 12:52:23 -0800 2009 | |
| |
lib/ | Fri Jan 16 12:52:23 -0800 2009 | |
| |
spec/ | Fri Jan 16 12:52:23 -0800 2009 | |
| |
test/ | Fri Jan 16 12:52:23 -0800 2009 |
PnMerbAuthRememberMe
This plugin provides a remember me function based on MerbAuth. Most of codes are from RestfulAuthentication on Rails
This plugin adds a mixin that you should include in your user model to provide 2 fields to remember the token and time to expire. The mixin will automatically select the correct sub mixin for all supported orms.
class User
include DataMapper::Resource
include Merb::Authentication::Mixins::AuthenticatedUser
property :id, Serial
end
Migration Requirements
The mixin requires some fields to be in-place on your model. Where needed include these in your migrations.
:remember_token_expires_at, DateTime
:remember_token, String
Configuration Options
declare in your merb/merb-auth/strategies.rb file
Merb::Authentication.activate!(:remember_me)
Instructions for installation:
Rake tasks to package/install the gem - edit this to modify the manifest.
file: config/dependencies.rb
# add the plugin as a regular dependency
dependency 'pn-merb-auth-remember-me'
file: slice/merb-auth-slice-password/app/controllers/sessions.rb or the logout action
# clear :auth_token after log out
cookies.delete :auth_token
In your unauthenticated.html.erb(Login page)
%input#rememberme{ :name => "remember_me" , :type => "checkbox", :value => "1"}
Remember Me







