mirror of https://github.com/golang-jwt/jwt.git
conversion error fixed
This commit is contained in:
parent
52e4189627
commit
0ebbeab74c
|
@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue