We have a use case where we'd like to store some adhoc data that's
related to a user in their session.

I note that contrib.auth.logout just deletes these session keys:
SESSION_KEY = '_auth_user_id'
BACKEND_SESSION_KEY = '_auth_user_backend'

I'd like an additional batch of keys to be deleted (or, more to the
point, all keys *except for a few*) when logout is called.

Of course I could have a separate function that does it and call that
any time logout gets called, but I'd prefer not to have to do that.
Since the data is sensitive, it seems like using a facade function or
a kwarg would be too easy to screw up.

What do you think about adding a setting, AUTHENTICATION_ON_LOGOUT,
which supplies an importable or callable?

I guess a signal could do it, too.

Signature something like:
def on_logout(session_wrapper, old_user)
?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@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-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to