Case for when exp value is json.Number with custom parser

This commit is contained in:
Peter Kieltyka 2016-01-21 14:45:08 -05:00
parent 35183c04d2
commit 4179debd0a

View file

@ -1,6 +1,7 @@
package jwtauth package jwtauth
import ( import (
"encoding/json"
"errors" "errors"
"net/http" "net/http"
"strings" "strings"
@ -169,6 +170,8 @@ func (ja *JwtAuth) IsExpired(t *jwt.Token) bool {
exp = int64(v) exp = int64(v)
case int64: case int64:
exp = v exp = v
case json.Number:
exp, _ = v.Int64()
default: default:
} }