Module

Biscotti.Session

Session provides 4 basic functions: create, get, set and destroy.

  • create takes a SessionStore and your session data and returns a Cookie representing your new session.
  • get takes a SessionStore and a Cookie and returns your session data, if available.
  • set takes a SessionStore, your session data and your current session Cookie. It returns a new session Cookie.
  • destroy takes a SessionStore and your session Cookie and returns a new, empty session Cookie.

#cookieStore

#memoryStore

Re-exports from Biscotti.Session.Store

#SessionStore

newtype SessionStore a

#set

set :: forall a. EncodeJson a => SessionStore a -> Setter a

Update a cookie to represent a new session

#get

get :: forall a. DecodeJson a => SessionStore a -> Getter a

Retrieve the session represented by a cookie

#destroy

destroy :: forall a. EncodeJson a => SessionStore a -> Destroyer

Destroy the session represented by a cookie and expire the cookie

#create

create :: forall a. EncodeJson a => SessionStore a -> Creater a

Create a cookie representing a new session

Modules