google: Re-enable AppEngineTokenSource to be used from Managed VMs.

Fixes #152.

Change-Id: I757c011d3ac5dca8f80fb2119eda3adf8c178ca6
Reviewed-on: https://go-review.googlesource.com/14622
Reviewed-by: Andrew Gerrand <adg@golang.org>
This commit is contained in:
Chris Broadfoot
2015-09-15 17:49:47 -07:00
parent ad0128250e
commit 52dcf34690
3 changed files with 20 additions and 2 deletions

View File

@@ -14,6 +14,9 @@ import (
"golang.org/x/oauth2"
)
// Set at init time by appenginevm_hook.go. If true, we are on App Engine Managed VMs.
var appengineVM bool
// Set at init time by appengine_hook.go. If nil, we're not on App Engine.
var appengineTokenFunc func(c context.Context, scopes ...string) (token string, expiry time.Time, err error)