middleware

package
v2.2.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2015 License: MIT Imports: 6 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL