Safe Haskell | Trustworthy |
---|---|
Language | Haskell98 |
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 Response Source
Execute action with the current user's name. Otherwise, request that the user authenticate.