From 166f7cf99498ea22fa1b54f783e8a09e0bbd17f6 Mon Sep 17 00:00:00 2001 From: Andrew Gerrand Date: Thu, 24 Sep 2015 14:44:22 +1000 Subject: [PATCH] google: set expiry on JWTAccessTokenSource Change-Id: Ib1ff6511ce38e17711486743601241285a34f164 Reviewed-on: https://go-review.googlesource.com/14934 Reviewed-by: Julien Boeuf Reviewed-by: Andrew Gerrand --- google/jwt.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google/jwt.go b/google/jwt.go index 804d9d0..6f7ec3a 100644 --- a/google/jwt.go +++ b/google/jwt.go @@ -67,5 +67,5 @@ func (ts *jwtAccessTokenSource) Token() (*oauth2.Token, error) { if err != nil { return nil, fmt.Errorf("google: could not encode JWT: %v", err) } - return &oauth2.Token{AccessToken: msg, TokenType: "Bearer"}, nil + return &oauth2.Token{AccessToken: msg, TokenType: "Bearer", Expiry: exp}, nil }