开发者

Authlogic automatic logout on timeout

开发者 https://www.devze.com 2023-02-10 05:57 出处:网络
I am using the Authlogic gem in my application, and I need users to be log开发者_运维技巧ged out automatically after 15 minutes of inactivity. Can somebody tell me how to do this?On User model:

I am using the Authlogic gem in my application, and I need users to be log开发者_运维技巧ged out automatically after 15 minutes of inactivity. Can somebody tell me how to do this?


On User model:

acts_as_authentic do |c|
  c.logged_in_timeout(5.minutes)
end

on UserSession model:

self.logout_on_timeout = true
0

精彩评论

暂无评论...
验证码 换一张
取 消