Safe Haskell | Trustworthy |
---|
This module exports a type corresponding to user's in Hails and some helper functions.
- type UserName = Text
- getHailsUser :: Controller (Maybe UserName)
- withUserOrDoAuth :: (UserName -> Controller Response) -> Controller Response
Documentation
getHailsUser :: Controller (Maybe UserName)Source
Get the current user.
withUserOrDoAuth :: (UserName -> Controller Response) -> Controller ResponseSource
Execute action with the current user's name. Otherwise, request that the user authenticate.