forked from Mirrors/oauth2
Revert "App Engine Managed VMs should depend on url fetcher."
This reverts commit 4901e89da7
.
This commit is contained in:
parent
4901e89da7
commit
648dd50ab3
|
@ -3,12 +3,11 @@
|
|||
package google
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
"github.com/golang/oauth2"
|
||||
|
||||
"google.golang.org/appengine"
|
||||
"google.golang.org/appengine/urlfetch"
|
||||
)
|
||||
|
||||
// AppEngineConfig represents a configuration for an
|
||||
|
@ -27,12 +26,7 @@ func NewAppEngineConfig(context appengine.Context, scopes []string) *AppEngineCo
|
|||
// NewTransport returns a transport that authorizes
|
||||
// the requests with the application's service account.
|
||||
func (c *AppEngineConfig) NewTransport() oauth2.Transport {
|
||||
transport := &urlfetch.Transport{
|
||||
Context: c.context,
|
||||
Deadline: 0,
|
||||
AllowInvalidServerCertificate: false,
|
||||
}
|
||||
return oauth2.NewAuthorizedTransport(transport, c, nil)
|
||||
return oauth2.NewAuthorizedTransport(http.DefaultTransport, c, nil)
|
||||
}
|
||||
|
||||
// FetchToken fetches a new access token for the provided scopes.
|
||||
|
|
Loading…
Reference in New Issue