thentos-core-0.0.1.1: The swiss army knife of privacy-preserving identity management

Safe HaskellNone
LanguageHaskell2010

Thentos.Frontend.State

Contents

Synopsis

errors

middleware

type FSession = Session IO () FrontendSessionData

type FSessionStore = SessionStore IO () FrontendSessionData

setCookie :: SetCookie

cookieName :: SBS

thentosSessionMiddleware :: IO (Middleware, Key FSession)

frontend action monad

serveFAction :: forall api. (HasServer api, Enter (ServerT api FAction) (FAction :~> ExceptT ServantErr IO) (Server api)) => Proxy api -> ServerT api FAction -> ActionState -> IO Application

cookieToFSession :: IO (Maybe FrontendSessionData) -> FAction ()

Write FrontendSessionData from the servant-session state to FAction state. If there is no state, do nothing.

cookieFromFSession :: (FrontendSessionData -> IO ()) -> FAction ()

Read FrontendSessionData from FAction and write back into servant-session state.