From 4179debd0a5be6e1a5bb8ea9ee8b9a2d30e9e7e0 Mon Sep 17 00:00:00 2001 From: Peter Kieltyka Date: Thu, 21 Jan 2016 14:45:08 -0500 Subject: [PATCH] Case for when exp value is json.Number with custom parser --- jwtauth.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/jwtauth.go b/jwtauth.go index 4e46864..ba37b14 100644 --- a/jwtauth.go +++ b/jwtauth.go @@ -1,6 +1,7 @@ package jwtauth import ( + "encoding/json" "errors" "net/http" "strings" @@ -169,6 +170,8 @@ func (ja *JwtAuth) IsExpired(t *jwt.Token) bool { exp = int64(v) case int64: exp = v + case json.Number: + exp, _ = v.Int64() default: }