Module

Biscotti.Session

Package
purescript-biscotti-session
Repository
drewolson/purescript-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 Source

#memoryStore Source

Re-exports from Biscotti.Session.Store

#SessionStore Source

newtype SessionStore a

#set Source

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

Update a cookie to represent a new session

#get Source

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

Retrieve the session represented by a cookie

#destroy Source

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

Destroy the session represented by a cookie and expire the cookie

#create Source

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

Create a cookie representing a new session