Interfaces for classes that have pluggable implementations.
- class reahl.interfaces.UserSessionProtocol¶
A UserSession represents a potentially lengthy interaction of a particular the user with the system.
- classmethod for_current_session()¶
Returns a UserSession instance for the current user. If no UserSession is present for the current interaction yet this method should create one. If a UserSession does exist for the current interaction, this method returns the correct UserSession.
Answers whether the interaction is currently done via a secure channel where applicable.
Answers whether the current user has been authenticated.
Sets a timestamp on the UserSession to indicate when the last activity was detected relating to this interaction. UserSessions typically expore automatically if no activity is detected after some time.
Answers a string identifying the currently selected locale.