예제 #1
0
// NewTransport returns a transport that authorizes
// the requests with the application's service account.
func (c *AppEngineConfig) NewTransport() oauth2.Transport {
	if c.Transport != nil {
		return oauth2.NewAuthorizedTransport(c.Transport, c, nil)
	}
	transport := &urlfetch.Transport{
		Context:                       c.context,
		Deadline:                      0,
		AllowInvalidServerCertificate: false,
	}
	return oauth2.NewAuthorizedTransport(transport, c, nil)
}
예제 #2
0
파일: google.go 프로젝트: robyoung/oauth2
// NewTransport creates an authorized transport.
func (c *ComputeEngineConfig) NewTransport() oauth2.Transport {
	return oauth2.NewAuthorizedTransport(http.DefaultTransport, c, nil)
}