简体   繁体   中英

In rails, how to expire a session given the session id?

I just get started to learn things in ruby on rails.

In rails, how can I expire a session with a specified session session_id?

Or is it a not recommended approach in ruby on rails?

Thanks in advance.

Not recommended. Its self controlled according to user login and logout but there are requirements and special cases.

If you really want to do after certain intervals : setting-session-timeout-in-rails .

For specific expiration date you can use session cookie as: Session Cookie .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM