Safe Haskell | None |
---|---|
Language | Haskell2010 |
Spock likes to store its session RAM, which is mostly great unless you need persistence or multiple machines. This doesn't do anything interesting with Spock's session manager, but just defines enough of a table to be able to store Spock's core session information.
Synopsis
- data SessionT d f = Session {
- _sessionId :: C f Text
- _sessionCsrf :: C f Text
- _sessionExpires :: C f UTCTime
- _sessionData :: d f
- type Session d = SessionT d Identity
- type SessionId d = PrimaryKey (SessionT d) Identity
Documentation
A generic Beam table to store a Spock session. The _sessionData
should
be your useful info, like a logged-in user or whatever. See
TsWeb.Tables.Session.Test for a type-checking but not very function idea
of what _sessionData
could look like, or the code under
main
for a fully-functional (but dumb) webapp using all this
stuff.
Session | |
|