commit | 9836dadd772134cea90efedc30e1e1c95af344aa | [log] [tgz] |
---|---|---|
author | Erick Tryzelaar <etryzelaar@google.com> | Fri Jul 06 17:34:26 2018 -0700 |
committer | Erick Tryzelaar <etryzelaar@google.com> | Tue Jul 10 09:44:44 2018 -0700 |
tree | 28b65bfe1bbabecb8a4a17f6cbc097197e9a2545 | |
parent | b258d5df36ce010053017146a79f287d8a31e874 [diff] |
Properly parse expiration time The golang oauth2 library's `Token` doesn't have an "expires_in" field. Instead oauth2 internally parses the expiration into a future unix timestamp. So before this patch, the tokens that oauth2device was producing didn't properly capture the expiration time. This patch fixes it by copying the logic from oauth2, which is unfortunately not exposed in a way that we can directly use. Change-Id: Idec2632c5d4cb272d9d2e8e0099972ad9dda9c3d
This package implements a small shim atop https://github.com/golang/oauth2 to support Google's OAuth2.0 flow for devices.
See the documentation for more details.