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

Safe HaskellNone
LanguageHaskell2010

Thentos.Frontend.Handlers.Combinators

Contents

Synopsis

helpers

loggerF :: Show v => v -> FAction ()

dashboard construction

setTab :: DashboardTab -> FAction ()

If logged in: set current dashboard tab.

renderDashboard :: (User -> [Role] -> Html) -> FAction Html

Call renderDashboard' to construct a dashboard page and render it in the frontend monad.

renderDashboard' :: (User -> [Role] -> FAction Html) -> FAction Html

Like renderDashboard, but take a pagelet builder instead of a pagelet.

authentication

runAsUserOrLogin :: (FrontendSessionData -> FrontendSessionLoginData -> FAction a) -> FAction a

Call runAsUser, and redirect to login page if not logged in.

runAsUser :: (FrontendSessionData -> FrontendSessionLoginData -> FAction a) -> FAction a -> FAction a

Runs a given handler with the credentials and the session data of the currently logged-in user. If not logged in, call a default handler that runs without any special clearance. (NOTE: Clearance modification does not happen here, but in enterFAction.)

session management

popServiceLoginState :: FAction (Maybe ServiceLoginState)

Recover the service login state from session, remove it there, and return it. If no service login state is stored, return Nothing.

showPageWithMessages :: (FrontendSessionData -> View Html -> ST -> Html) -> View Html -> ST -> FAction Html

uri manipulation

emailConfirmUrl :: HttpConfig -> ST -> ST -> ST

redirect' :: SBS -> FAction a

redirectURI :: URI -> FAction a

redirectRR :: RelativeRef -> FAction a