Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckAuthenticity ¶
func CheckAuthenticity(w http.ResponseWriter, r *http.Request) error
CheckAuthenticity checks the authenticity token in params against cookie - The masked token is inserted into forms and POSTS by js. The token is inserted into the cookie by the middleware above. This is a shortcut for where you don't need params otherwise.
func CurrentUser ¶
CurrentUser returns the saved user (or an empty anon user) for the current session cookie
func Middleware ¶
func Middleware(h http.HandlerFunc) http.HandlerFunc
Middleware sets a token on every GET request so that it can be inserted into the view. It currently ignores requests for files and assets.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.