1
0
mirror of https://github.com/labstack/echo.git synced 2024-12-24 20:14:31 +02:00

Update JWT lib to v3

Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana 2016-06-16 14:40:43 -07:00
parent 2fab27a378
commit fbcdf70c52
2 changed files with 8 additions and 7 deletions

12
glide.lock generated
View File

@ -1,12 +1,12 @@
hash: 21820434709470e49c64df0f854d3352088ca664d193e29bc6cd434518c27a7c
updated: 2016-06-11T08:07:31.375646661-07:00
updated: 2016-06-16T14:30:17.695241955-07:00
imports:
- name: github.com/davecgh/go-spew
version: 5215b55f46b2b919f50a1df0eaa5886afe4e3b3d
subpackages:
- spew
- name: github.com/dgrijalva/jwt-go
version: c04502f106d7c5b3fae17c5da49a1bbdd3006b3c
version: d2709f9f1f31ebcda9651b03077758c1f3a0018c
- name: github.com/klauspost/compress
version: 14eb9c4951195779ecfbec34431a976de7335b0a
subpackages:
@ -32,22 +32,22 @@ imports:
subpackages:
- difflib
- name: github.com/stretchr/testify
version: 8d64eb7173c7753d6419fd4a9caf057398611364
version: d77da356e56a7428ad25149ca77381849a6a5232
subpackages:
- assert
- name: github.com/valyala/fasthttp
version: 8db7d05839b5f4d21d5da1fcb3897d294ff6fd9f
version: 83a24c301bb683e450cd0304a3eb69556c48678c
subpackages:
- fasthttputil
- name: github.com/valyala/fasttemplate
version: 3b874956e03f1636d171bda64b130f9135f42cff
- name: golang.org/x/net
version: 3f122ce3dbbe488b7e6a8bdb26f41edec852a40b
version: d7bf3545bb0dacf009c535b3d3fbf53ac0a339ab
subpackages:
- context
- websocket
- name: golang.org/x/sys
version: 7f918dd405547ecb864d14a8ecbbfe205b5f930f
version: 62bee037599929a6e9146f29d10dd5208c43507d
subpackages:
- unix
devImports: []

View File

@ -45,7 +45,8 @@ func TestJWT(t *testing.T) {
h = JWT([]byte("secret"))(handler)
if assert.NoError(t, h(c)) {
user := c.Get("user").(*jwt.Token)
assert.Equal(t, user.Claims["name"], "John Doe")
claims := user.Claims.(jwt.MapClaims)
assert.Equal(t, claims["name"], "John Doe")
}
// Invalid Authorization header