Skip to content

Commit 22f8b75

Browse files
committed
remove stale comments and unused constant
1 parent e7efdb4 commit 22f8b75

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

google/internal/externalaccount/basecredentials.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ import (
1616
"golang.org/x/oauth2/google/internal/stsexchange"
1717
)
1818

19-
var maxUnixTime = time.Unix(1<<63-1, 999999999)
20-
2119
// now aliases time.Now for testing
2220
var now = func() time.Time {
2321
return time.Now().UTC()
@@ -245,8 +243,6 @@ func (ts tokenSource) Token() (*oauth2.Token, error) {
245243
}
246244

247245
// The RFC8693 doesn't define the explicit 0 of "expires_in" field behavior.
248-
// In practice a lot of sts request is using 0 means "never expire" for an sts token.
249-
// So the logic here shall use a max unix time value.
250246
if stsResp.ExpiresIn <= 0 {
251247
return nil, fmt.Errorf("oauth2/google: got invalid expiry from security token service")
252248
}

0 commit comments

Comments
 (0)