fixed token expiration calculation

This commit is contained in:
Brad Rydzewski 2015-04-13 19:11:33 -07:00
parent a40d20dcdb
commit aebacfccd7

View file

@ -70,7 +70,7 @@ func (s *session) GetLogin(r *http.Request) *common.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 token