client_appengine.go 505 B

123456789101112131415161718192021222324
  1. // Copyright 2014 The oauth2 Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. // +build appengine appenginevm
  5. // App Engine hooks.
  6. package oauth2
  7. import (
  8. "net/http"
  9. "golang.org/x/net/context"
  10. "google.golang.org/appengine/urlfetch"
  11. )
  12. func init() {
  13. registerContextClientFunc(contextClientAppEngine)
  14. }
  15. func contextClientAppEngine(ctx context.Context) (*http.Client, error) {
  16. return urlfetch.Client(ctx), nil
  17. }