Commit 158af2c
x/oauth2: apply the expires_in value returned by the server to Token.ExpiresIn
In typical usage, Token.Expiry alone is sufficient.
However, the ExpiresIn field was introduced in golang/go#61417.
Even when a server returns an expires_in value in
methods like Config.Exchange, only the Expiry field is updated,
leaving ExpiresIn unchanged, which can cause confusion.
This change ensures that the ExpiresIn field is properly updated
when the server provides an expires_in value.
merges golang#748 (golang#748)1 parent 293f719 commit 158af2c
2 files changed
+8
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
53 | 58 | | |
54 | 59 | | |
55 | 60 | | |
| |||
295 | 300 | | |
296 | 301 | | |
297 | 302 | | |
| 303 | + | |
298 | 304 | | |
299 | 305 | | |
300 | 306 | | |
| |||
312 | 318 | | |
313 | 319 | | |
314 | 320 | | |
| 321 | + | |
315 | 322 | | |
316 | 323 | | |
317 | 324 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
| 166 | + | |
166 | 167 | | |
167 | 168 | | |
168 | 169 | | |
| |||
0 commit comments