I see what you are saying, but I want the user to be automatically
logged out after a period of inactivity for security purposes.

1)  Do you mean I would check the last time they saved and then
compare it with a time limit everytime they alter a session?
2)  If the time limit has been surpassed, would I disallow the
transaction and then log them out?

I was hoping there was another way where somehow the system would
check constantly and expire old sessions and cookies automatically.
I'm still unsure how something could sit in the background and check
every minute, not  sure if its even possible.


On May 31, 12:07 pm, ringemup <[EMAIL PROTECTED]> wrote:
> Why not store a parameter in the session indicating when it was last
> saved.  On each page load, first check that parameter and if it's too
> long ago, discard the session and begin a new one.  Then update the
> parameter with the current time.
>
> You may need middleware to accomplish this, but it ought to be
> extremely simple to implement.  It won't get rid of the actual cookies
> if the user doesn't return, but it will take care of session
> expiration, and the old cookies shouldn't matter, since they contain
> no session data except the ID, which you're invalidating after a
> certain amount of time anyway.
>
> On May 31, 12:54 pm, tyman26 <[EMAIL PROTECTED]> wrote:
>
> > I also need to implement this type of feature.  Did you find anything
> > on this?
>
> > On May 2, 12:29 pm, [EMAIL PROTECTED] wrote:
>
> > > Hi all,
>
> > > I use django.contrib.sessionswith SESSION_EXPIRE_AT_BROWSER_CLOSE=True.
>
> > > I need a way toexpireasessionon certain amount of time of inactivity in 
> > > the browser.
>
> > > Each new request to django should retrigger theexpiretime.
>
> > > Is there a possibility to modifiy thesessionmodule or build a middleware 
> > > which does this ?
>
> > > Regards,
> > > Dirk
> > > --
> > > "Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
> > > Jetzt GMX TopMail testen:http://www.gmx.net/de/go/topmail


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to