1
0
mirror of https://github.com/labstack/echo.git synced 2024-12-24 20:14:31 +02:00
Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana 2016-09-07 12:18:57 -07:00
parent 65b60a4ed2
commit e980bd9055
2 changed files with 3 additions and 2 deletions

View File

@ -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

View File

@ -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