Documentation ¶
Index ¶
- func CurrentUser(r *http.Request) (*users.User, error)
- func LoggedIn(r *http.Request) bool
- func Login(w http.ResponseWriter, r *http.Request, u *users.User) error
- func LoginRequired(onError http.HandlerFunc) negroni.HandlerFunc
- func Middleware(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CurrentUser ¶
CurrentUser returns the current user's object.
func LoginRequired ¶
func LoginRequired(onError http.HandlerFunc) negroni.HandlerFunc
LoginRequired is a middleware that requires a logged-in user.
func Middleware ¶
func Middleware(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
Middleware loads the user's authentication state from their session cookie.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.