mirror of
https://github.com/labstack/echo.git
synced 2024-12-24 20:14:31 +02:00
parent
65b60a4ed2
commit
e980bd9055
@ -26,7 +26,7 @@
|
||||
- Test Suite: https://github.com/vishr/web-framework-benchmark
|
||||
- Date: 4/4/2016
|
||||
|
||||
![Performance](http://i.imgur.com/fZVnK52.png)
|
||||
![Performance](https://i.imgur.com/fZVnK52.png)
|
||||
|
||||
## Quick Start
|
||||
|
||||
|
@ -76,6 +76,7 @@ var (
|
||||
func JWT(key []byte) echo.MiddlewareFunc {
|
||||
c := DefaultJWTConfig
|
||||
c.SigningKey = key
|
||||
c.Claims = jwt.MapClaims{}
|
||||
return JWTWithConfig(c)
|
||||
}
|
||||
|
||||
@ -96,7 +97,7 @@ func JWTWithConfig(config JWTConfig) echo.MiddlewareFunc {
|
||||
config.ContextKey = DefaultJWTConfig.ContextKey
|
||||
}
|
||||
if config.Claims == nil {
|
||||
config.Claims = DefaultJWTConfig.Claims
|
||||
config.Claims = jwt.MapClaims{}
|
||||
}
|
||||
if config.TokenLookup == "" {
|
||||
config.TokenLookup = DefaultJWTConfig.TokenLookup
|
||||
|
Loading…
Reference in New Issue
Block a user