negroniJWT: Index | Files

package negroniJWT

import ""


Package Files


func Bundle Uses

func Bundle() (p []byte, err error)

func GenerateToken Uses

func GenerateToken(claims map[string]interface{}, expiration time.Time) (s string, err error)

GenerateToken generates the base64 encoded JSON Web Token including the claims map provided and and expiration time.

func Get Uses

func Get(r *http.Request) (claims map[string]interface{}, ok bool)

Get attempts to retrieve the claims map for request. If there was an error decoding the JSON Web Token.

func Init Uses

func Init(alwaysFailRequest bool, privKeyPath, pubKeyPath string)

func Middleware Uses

func Middleware(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc)

Middleware the main middleware function. Use with negroni.HandlerFunc to apply middleware like so : n := negroni.Classic() n.Use(negroni.HandlerFunc(negroniJWT.Middleware))

Package negroniJWT imports 18 packages (graph). Updated 2016-11-04. Refresh now. Tools for package owners. This is an inactive package (no imports and no commits in at least two years).