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
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:
}