The latest version of simple-session is 2.0.0-0.
simple-session
Version 0.10.1.1 revision 0 uploaded by AmitLevy.
Package meta
- Synopsis
- Cookie-based session management for the Simple web framework
- Description
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]
- Author
- Amit Aryeh Levy
- Bug reports
- http://github.com/alevy/simple/issues
- Category
- Web
- Copyright
- n/a
- Homepage
- http://simple.cx
- Maintainer
- amit@amitlevy.com
- Package URL
- n/a
- Stability
- n/a