Skip to content

Commit fbcdf70

Browse files
committed
Update JWT lib to v3
Signed-off-by: Vishal Rana <vr@labstack.com>
1 parent 2fab27a commit fbcdf70

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

glide.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

middleware/jwt_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ func TestJWT(t *testing.T) {
4545
h = JWT([]byte("secret"))(handler)
4646
if assert.NoError(t, h(c)) {
4747
user := c.Get("user").(*jwt.Token)
48-
assert.Equal(t, user.Claims["name"], "John Doe")
48+
claims := user.Claims.(jwt.MapClaims)
49+
assert.Equal(t, claims["name"], "John Doe")
4950
}
5051

5152
// Invalid Authorization header

0 commit comments

Comments
 (0)