Purpose: This document discusses the SessionLock class's events and their use in monitoring and controlling the current user's session.
SessionLock Events
The SessionLock class contains 2 shared (static) events that provide hooks into the session locking:
- AfterSessionLock
- BeforeSessionLock
AfterSessionLock
The AfterSessionLock event is raised immediately after the session lock is released, meaning that a user has re-authenticated and the application is resuming. The AfterSessionLock event is raised after the SecurityBasics.CurrentUserChanged event if a different user has logged into the application.
BeforeSessionLock
The BeforeSessionLock event is raise immediately before the application’s session locks. This event is raised regardless of whether the application is being explicitly or automatically locked and provides a hook to enable any custom processing that must take place before the session locks (such as saving off the current user’s settings before another user is allowed to log into the application).