I have a website that contains several sets of rules for different users. One of the rules (permission) depends on the expiration of the session.
For example, a session of non-authenticated users should be cleared if the browser is closed, however authenticated user sessions should live for a constant time.
In addition, for authenticated users, some keys in a session can be deleted when the browser is closed, but others must be saved.
How can I achieve this key based session end in Django?
source share