diff options
author | Frédéric Guillot <fred@miniflux.net> | 2017-11-22 22:22:33 -0800 |
---|---|---|
committer | Frédéric Guillot <fred@miniflux.net> | 2017-11-22 22:22:33 -0800 |
commit | cc6d272eb7719bcca02c7f36a1badbeecb153759 (patch) | |
tree | 2fd6e92dcaa19faccfc25ff67499abcc6dabbaaf /vendor/golang.org/x/oauth2/client_appengine.go | |
parent | 9877051f12621aa71daad520caa2847c47c746f8 (diff) |
Add OAuth2 authentication
Diffstat (limited to 'vendor/golang.org/x/oauth2/client_appengine.go')
-rw-r--r-- | vendor/golang.org/x/oauth2/client_appengine.go | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/vendor/golang.org/x/oauth2/client_appengine.go b/vendor/golang.org/x/oauth2/client_appengine.go new file mode 100644 index 0000000..8962c49 --- /dev/null +++ b/vendor/golang.org/x/oauth2/client_appengine.go @@ -0,0 +1,25 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build appengine + +// App Engine hooks. + +package oauth2 + +import ( + "net/http" + + "golang.org/x/net/context" + "golang.org/x/oauth2/internal" + "google.golang.org/appengine/urlfetch" +) + +func init() { + internal.RegisterContextClientFunc(contextClientAppEngine) +} + +func contextClientAppEngine(ctx context.Context) (*http.Client, error) { + return urlfetch.Client(ctx), nil +} |