fixed token expiration calculation
This commit is contained in:
parent
a40d20dcdb
commit
aebacfccd7
1 changed files with 1 additions and 1 deletions
|
@ -70,7 +70,7 @@ func (s *session) GetLogin(r *http.Request) *common.Token {
|
||||||
return token
|
return token
|
||||||
}
|
}
|
||||||
|
|
||||||
if time.Now().UTC().Add(s.expire).Unix() > token.Issued {
|
if time.Unix(token.Issued, 0).Add(s.expire).Before(time.Now()) {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
return token
|
return token
|
||||||
|
|
Loading…
Reference in a new issue