hails-0.9.2.1: Multi-app web platform framework

Safe HaskellTrustworthy

Hails.Web.User

Description

This module exports a type corresponding to user's in Hails and some helper functions.

Synopsis

Documentation

type UserName = TextSource

User name.

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.