traefik/vendor/golang.org/x/oauth2/client_appengine.go

26 lines
530 B
Go
Raw Normal View History

2017-04-07 10:49:53 +00:00
// Copyright 2014 The Go Authors. All rights reserved.
2017-02-07 21:33:23 +00:00
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
2017-04-07 10:49:53 +00:00
// +build appengine
2017-02-07 21:33:23 +00:00
// App Engine hooks.
package oauth2
import (
"net/http"
"golang.org/x/net/context"
2017-04-07 10:49:53 +00:00
"golang.org/x/oauth2/internal"
2017-02-07 21:33:23 +00:00
"google.golang.org/appengine/urlfetch"
)
func init() {
2017-04-07 10:49:53 +00:00
internal.RegisterContextClientFunc(contextClientAppEngine)
2017-02-07 21:33:23 +00:00
}
func contextClientAppEngine(ctx context.Context) (*http.Client, error) {
return urlfetch.Client(ctx), nil
}