Sliding Session Timeout plugin
Plugin details
Documentation
ruby script/plugin install https://wush.net/svn/public/sliding_session_timeout
the macro for use in controllers
sliding_session_timeout seconds [, upon_expiry_function]
'seconds' is the time in seconds for a session to live
'upon_expiry_function' is an optional method to call when a session dies
- ActionController::Base.reset_session will be called upon session expiry.
- If an expiry_function was provided, the call to reset_session will happen after the call to the expiry_function to preserve session data for the expiry_function.
Examples:
# in app/controllers/application.rb
# expire in thirty minutes
sliding_session_timeout 60 * 30
# or use Rails' number helpers
sliding_session_timeout 30.minutes
# expire in two hours and call the 'logout' method upon expiry
sliding_session_timeout 2.hours, :logout def logout # do stuff here for logout end
Further Documentation
There is currently no advanced documentation for this plugin.
New documentationEdit plugin | (0 older versions) | Last edited by: scott, 5 months ago

