Documentation ¶
Index ¶
- func NegroniCorsAllowAll() negroni.Handler
- func NegroniCorsNew(opt cors.Options) negroni.Handler
- func NegroniJwtHandler(key string, skipper Skipper, signMethod *jwt.SigningMethodHMAC, ...) negroni.Handler
- func NegroniLoggerHandler() negroni.Handler
- func NegroniRecoverHandler() negroni.Handler
- type JWTMiddleware
- type Skipper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NegroniCorsAllowAll ¶
func NegroniJwtHandler ¶
func NegroniJwtHandler(key string, skipper Skipper, signMethod *jwt.SigningMethodHMAC, errHandler func(w http.ResponseWriter, r *http.Request, err string)) negroni.Handler
NegroniJwtHandler returns a JWT middleware as a negroni handler. errHandler will be invoked if a err occurs while check JWT. and the errHandler must write to the response or not the client will be block.
func NegroniLoggerHandler ¶
NegroniLoggerHandler returns a logging handler.
func NegroniRecoverHandler ¶
NegroniRecoverHandler returns a handler for recover from a http request.
Types ¶
type JWTMiddleware ¶
type JWTMiddleware struct { *jwtmiddleware.JWTMiddleware // contains filtered or unexported fields }
JWTMiddleware is a wrapper of go-jwt-middleware, but added a skipper func on it.
Click to show internal directories.
Click to hide internal directories.