Module

Biscotti.Session.Store

#Creater

type Creater a = a -> Aff (Either String Cookie)

#Destroyer

#Getter

type Getter a = Cookie -> Aff (Either String a)

#SessionStore

newtype SessionStore a

Constructors

#Setter

type Setter a = a -> Cookie -> Aff (Either String Cookie)

#create

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

Create a cookie representing a new session

#destroy

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

Destroy the session represented by a cookie and expire the cookie

#get

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

Retrieve the session represented by a cookie

#set

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

Update a cookie to represent a new session

Modules