Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JWTAuth ¶
func JWTAuth(server *app.App) func(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
JWTAuth parses a JWT token from an authorization header.
func SetUserContext ¶
func SetUserContext(server *app.App) func(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
SetUserContext takes a JWT token from the mux context and looks up the user by id. The user is then set into the same context.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.