mirror of
https://forgejo.merr.is/annika/jwtauth.git
synced 2025-12-11 13:47:41 -05:00
Minor
This commit is contained in:
parent
a872c75843
commit
079feacddb
1 changed files with 1 additions and 3 deletions
|
|
@ -164,8 +164,6 @@ func (ja *JwtAuth) keyFunc(t *jwt.Token) (interface{}, error) {
|
|||
func (ja *JwtAuth) IsExpired(t *jwt.Token) bool {
|
||||
if expv, ok := t.Claims["exp"]; ok {
|
||||
var exp int64
|
||||
now := EpochNow()
|
||||
|
||||
switch v := expv.(type) {
|
||||
case float64:
|
||||
exp = int64(v)
|
||||
|
|
@ -174,7 +172,7 @@ func (ja *JwtAuth) IsExpired(t *jwt.Token) bool {
|
|||
default:
|
||||
}
|
||||
|
||||
if exp < now {
|
||||
if exp < EpochNow() {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue