Safe Haskell | Safe-Infered |
---|
This is the client-side cookie-backed implementation of typed sessions. Because all data is stored on the client, this session back-end is easier to use in load balanced settings, and session timeouts are optional. All session data is encrypted so that it cannot be read by the client itself. However, it has the disadvantage of only being able to store serializable data types.
- data ClientSessionManager t
- initClientSessions :: Serialize t => FilePath -> ByteString -> Maybe Int -> IO t -> SnapletInit b (ClientSessionManager t)
- module Snap.Snaplet.TypedSession
Documentation
data ClientSessionManager t Source
The typed session manager that stores session data directly in encrypted client-side cookies.
Serialize t => HasTypedSession (ClientSessionManager t) t |
:: Serialize t | |
=> FilePath | Location of an encryption key |
-> ByteString | Name for the session cookie |
-> Maybe Int | Optional session timeout in seconds |
-> IO t | Initializer for new sessions |
-> SnapletInit b (ClientSessionManager t) |
Initializer for the cookie-backed typed session snaplet.
module Snap.Snaplet.TypedSession