wai-session-maybe: Flexible session middleware for WAI

[ library, web ] [ Propose Tags ] [ Report a vulnerability ]

Provides a generic, cookie-based middleware for sessions that is parameterised over the session store, the cookie name, and the cookie parameters (such as path, expiry, etc). Passes a pair of functions (lookup key, set key) for the current session through the Vault in the Request.

Also provides a simple example session store based on threadsafe IORefs and Data.Map.

See example/Main.hs in git for example usage.


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 1.0.0
Dependencies base (>=4 && <5), blaze-builder, bytestring, bytestring-builder, containers, cookie, entropy, http-types, StateVar, time, transformers, vault, wai (>=2.0.0) [details]
Tested with ghc ==7.0.3
License LicenseRef-OtherLicense
Copyright © 2012 Stephen Paul Weber
Author Stephen Paul Weber <singpolyma@singpolyma.net>
Maintainer support@digitallyinduced.com
Uploaded by MarcScholten at 2026-03-24T13:41:16Z
Category Web
Home page https://github.com/digitallyinduced/wai-session-maybe
Bug tracker https://github.com/digitallyinduced/wai-session-maybe/issues
Source repo head: git clone https://github.com/digitallyinduced/wai-session-maybe.git
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 0 total (0 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2026-03-24 [all 1 reports]

Readme for wai-session-maybe-1.0.0

[back to package description]
Provides a generic, cookie-based middleware for sessions that is
parameterised over the session store, the cookie name, and the
cookie parameters (such as path, expiry, etc).  Passes a pair of
functions (lookup key, set key) for the current session through the
'Vault' in the 'Request'.

Also provides a simple example session store based on threadsafe
'IORef's and 'Data.Map'.

See example/Main.hs in git for example usage.