Home | History | Annotate | Download | only in oauth2
      1 // Copyright 2014 The Go 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 
      5 // +build appengine
      6 
      7 // App Engine hooks.
      8 
      9 package oauth2
     10 
     11 import (
     12 	"net/http"
     13 
     14 	"golang.org/x/net/context"
     15 	"golang.org/x/oauth2/internal"
     16 	"google.golang.org/appengine/urlfetch"
     17 )
     18 
     19 func init() {
     20 	internal.RegisterContextClientFunc(contextClientAppEngine)
     21 }
     22 
     23 func contextClientAppEngine(ctx context.Context) (*http.Client, error) {
     24 	return urlfetch.Client(ctx), nil
     25 }
     26