Documentation ¶
Overview ¶
Package auth ensures that a user has sufficient permissions to access content.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Admin ¶
func Admin() echo.HandlerFunc
Admin ensures that the current user is an admin. We trust the scopes presented by the client because they're validated through HMAC in LoggedIn().
func CSRF ¶
func CSRF(db *sqlx.DB) echo.HandlerFunc
CSRF ensures that any forms posted to Abot are protected against Cross-Site Request Forgery. Without this function, Abot would be vulnerable to the attack because tokens are stored client-side in cookies.
func LoggedIn ¶
func LoggedIn() echo.HandlerFunc
LoggedIn determines if the user is currently logged in.
Types ¶
Click to show internal directories.
Click to hide internal directories.