forked from remote/oauth2
remove cache
This commit is contained in:
@@ -5,8 +5,9 @@ package google
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"appengine"
|
||||
"github.com/golang/oauth2"
|
||||
|
||||
"appengine"
|
||||
)
|
||||
|
||||
// AppEngineConfig represents a configuration for an
|
||||
@@ -28,12 +29,6 @@ func (c *AppEngineConfig) NewTransport() oauth2.Transport {
|
||||
return oauth2.NewAuthorizedTransport(c, nil)
|
||||
}
|
||||
|
||||
// NewTransport returns a token-caching transport that authorizes
|
||||
// the requests with the application's service account.
|
||||
func (c *AppEngineConfig) NewTransportWithCache(cache oauth2.Cache) (oauth2.Transport, error) {
|
||||
return oauth2.NewAuthorizedTransportWithCache(c, cache)
|
||||
}
|
||||
|
||||
// FetchToken fetches a new access token for the provided scopes.
|
||||
func (c *AppEngineConfig) FetchToken(existing *oauth2.Token) (*oauth2.Token, error) {
|
||||
token, expiry, err := appengine.AccessToken(c.context, strings.Join(c.scopes, " "))
|
||||
|
||||
Reference in New Issue
Block a user