commit | e5821faa40c1840f2158079ba2ad331a659f1b7c | [log] [tgz] |
---|---|---|
author | Scott Ganyo <scott@ganyo.com> | Wed Mar 15 12:35:53 2017 -0700 |
committer | Scott Ganyo <scott@ganyo.com> | Wed Mar 15 12:35:53 2017 -0700 |
tree | ce474f26d39a0542a83adaaa54357f909ee97025 | |
parent | 165610e215df619ccd0bb5c75dff2064f0ef7448 [diff] |
if token.expires is 0, consider it infinite
diff --git a/token.go b/token.go index 4561812..60097c1 100644 --- a/token.go +++ b/token.go
@@ -155,7 +155,7 @@ continue } - if token.ExpiresIn >= 0 { + if token.ExpiresIn > 0 { token.ExpiresAt = time.Now().Add(time.Duration(token.ExpiresIn) * time.Millisecond) } else { // no expiration, arbitrarily expire about a year from now