diff options
author | Shinya Maeda <shinya@gitlab.com> | 2017-10-02 17:13:46 +0900 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2017-10-02 17:13:46 +0900 |
commit | 2cb1d617d90b4a9311e3a35434bec958f266d22a (patch) | |
tree | cd235e875814d8032ed74f18a10eb8a6a4e3d12b /lib/google_api/auth.rb | |
parent | 5663b4808df787b1bcbf32ba54eccbb4c7537e25 (diff) | |
download | gitlab-ce-2cb1d617d90b4a9311e3a35434bec958f266d22a.tar.gz |
Use expires_in for access_token validation
Diffstat (limited to 'lib/google_api/auth.rb')
-rw-r--r-- | lib/google_api/auth.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/google_api/auth.rb b/lib/google_api/auth.rb index 92787b87ac6..8c962af51d7 100644 --- a/lib/google_api/auth.rb +++ b/lib/google_api/auth.rb @@ -19,7 +19,8 @@ module GoogleApi end def get_token(code) - client.auth_code.get_token(code, redirect_uri: redirect_uri).token + ret = client.auth_code.get_token(code, redirect_uri: redirect_uri) + return ret.token, ret.expires_at end protected |