mirror of
https://forgejo.merr.is/annika/jwtauth.git
synced 2025-12-11 17:07:44 -05:00
Case for when exp value is json.Number with custom parser
This commit is contained in:
parent
35183c04d2
commit
4179debd0a
1 changed files with 3 additions and 0 deletions
|
|
@ -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:
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue