зеркало из https://github.com/golang/oauth2.git
3c9c1f6d00
The sts response contains an optional field of `expires_in` and the value can be any integer.
https://github.com/golang/oauth2/blob/master/google/internal/externalaccount/basecredentials.go#L246-L248
In the case of less than `0`, we are going to throw an error. But in the case of equals to `0` practically it means "never expire" instead of "instantly expire" which doesn't make sense.
So we need to not set the expiration value for Token object. The current else if greater or equal is wrong.
It's never triggered only because we are sending positive `3600` in sts response.
Change-Id: Id227ca71130855235572b65ab178681e80d0da3a
GitHub-Last-Rev:
|
||
---|---|---|
.. | ||
testdata | ||
aws.go | ||
aws_test.go | ||
basecredentials.go | ||
basecredentials_test.go | ||
executablecredsource.go | ||
executablecredsource_test.go | ||
filecredsource.go | ||
filecredsource_test.go | ||
header.go | ||
header_test.go | ||
programmaticrefreshcredsource.go | ||
programmaticrefreshcredsource_test.go | ||
urlcredsource.go | ||
urlcredsource_test.go |