simple-session-0.10.0.0: simple-session.cabal
name: simple-session
version: 0.10.0.0
synopsis: Cookie-based session management for the Simple web framework
description:
Adds cookie-based session management to simple 'Controller's. 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]
homepage: http://simple.cx
Bug-Reports: http://github.com/alevy/simple/issues
license: LGPL-3
license-file: LICENSE
author: Amit Aryeh Levy
maintainer: amit@amitlevy.com
category: Web
build-type: Simple
cabal-version: >=1.10
library
hs-source-dirs: src
ghc-options: -Wall
exposed-modules:
Web.Simple.Session
build-depends:
base < 6
, blaze-builder
, cookie
, cryptohash
, byteable
, base64-bytestring
, bytestring
, containers
, http-types
, simple >= 0.10
, transformers
, wai >= 3.0
default-language: Haskell2010
source-repository head
type: git
location: http://github.com/alevy/simple.git