Documentation
¶
Index ¶
- func Bundle() (p []byte, err error)
- func GenerateToken(claims map[string]interface{}, expiration time.Time) (s string, err error)
- func Get(r *http.Request) (claims map[string]interface{}, ok bool)
- func Init(alwaysFailRequest bool, privKeyPath, pubKeyPath string)
- func Middleware(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateToken ¶
GenerateToken generates the base64 encoded JSON Web Token including the claims map provided and and expiration time.
func Get ¶
Get attempts to retrieve the claims map for request. If there was an error decoding the JSON Web Token.
func Middleware ¶
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))
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.