This module provides the generic interface to the various typed session implementations, including both server-side and client-side typed sessions.
- class HasTypedSession v t | v -> t where
- withSession :: HasTypedSession v t => (t -> Handler b v a) -> Handler b v a
- getFromSession :: (Ord k, HasTypedSession v (Map k a)) => k -> Handler b v (Maybe a)
- setInSession :: (Ord k, HasTypedSession v (Map k a)) => k -> a -> Handler b v ()
- deleteFromSession :: (Ord k, HasTypedSession v (Map k a)) => k -> Handler b v ()
The generic interface to typed session implementations. Both the client-side and server-side implementations of sessions implement the common interface specified here.
Retrieves the session for the current request, always creating it if necessary.
Stores a new value for the current session.
Completely clears the current session, removing all associated cookies and server-side storage if applicable.
Marks a session as recently used, resetting the session timeout counter.
A convenience function for gaining access to the session. The
session is touched and then passed to the nested
Gets a named value from a session that happens to be a
Sets a named value in a session that happens to be a