conversion error fixed

This commit is contained in:
David Komer 2016-03-17 15:12:22 +02:00
parent 52e4189627
commit 0ebbeab74c
1 changed files with 4 additions and 3 deletions

View File

@ -102,12 +102,13 @@ func (p *Parser) Parse(tokenString string, keyFunc Keyfunc) (*Token, error) {
} }
} }
} else { } else {
var ok bool if num, ok := token.Claims["exp"].(float64); ok {
if exp, ok = token.Claims["exp"].(int64); ok {
vexp = true vexp = true
exp = int64(num)
} }
if nbf, ok = token.Claims["nbf"].(int64); ok { if num, ok := token.Claims["nbf"].(float64); ok {
vnbf = true vnbf = true
nbf = int64(num)
} }
} }