The simple-session package

[Tags:lgpl, library]

Adds cookie-based session management to simple Controllers. To add to an application, declare the Controller setting's type an instance of HasSession, and wrap routes with withSession. For example:

 data AppSettings = ...

 instance HasSession AppSettings where
 controllerApp settings $ withSessions $ do
   routeName \"posts\" $ ...

Then, in your controllers you can seemlessly get and set keys from the session:

 get "/profile" $ do
   muserId <- sessionLookup "current_user_id"
   case muserIf of
     Nothing -> respond $ redirectTo "/login"
     Just userId -> [handle request]


Versions 0.6.0, 0.7.0, 0.8.0,,,,,,
Change log
Dependencies base (<6), base64-bytestring, blaze-builder, byteable, bytestring, containers, cookie, cryptohash, http-types, simple (>=0.10), transformers, wai (>=3.0), wai-extra (>=3.0) [details]
License LGPL-3
Author Amit Aryeh Levy
Category Web
Home page
Bug tracker
Source repository head: git clone
Uploaded Wed Nov 18 17:02:47 UTC 2015 by AmitLevy
Distributions LTSHaskell:, NixOS:, Stackage:, Tumbleweed:
Downloads 1510 total (9 in the last 30 days)
1 []
Status Docs available [build log]
Last success reported on 2015-11-18 [all 1 reports]




Maintainer's Corner

For package maintainers and hackage trustees