aboutsummaryrefslogtreecommitdiff
path: root/vendor/golang.org/x/oauth2/oauth2.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/golang.org/x/oauth2/oauth2.go')
-rw-r--r--vendor/golang.org/x/oauth2/oauth2.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/vendor/golang.org/x/oauth2/oauth2.go b/vendor/golang.org/x/oauth2/oauth2.go
index a682896..7b06bfe 100644
--- a/vendor/golang.org/x/oauth2/oauth2.go
+++ b/vendor/golang.org/x/oauth2/oauth2.go
@@ -21,6 +21,8 @@ import (
// NoContext is the default context you should supply if not using
// your own context.Context (see https://golang.org/x/net/context).
+//
+// Deprecated: Use context.Background() or context.TODO() instead.
var NoContext = context.TODO()
// RegisterBrokenAuthHeaderProvider registers an OAuth2 server
@@ -37,6 +39,8 @@ func RegisterBrokenAuthHeaderProvider(tokenURL string) {
// Config describes a typical 3-legged OAuth2 flow, with both the
// client application information and the server's endpoint URLs.
+// For the client credentials 2-legged OAuth2 flow, see the clientcredentials
+// package (https://golang.org/x/oauth2/clientcredentials).
type Config struct {
// ClientID is the application's ID.
ClientID string
@@ -295,7 +299,7 @@ func NewClient(ctx context.Context, src TokenSource) *http.Client {
if src == nil {
c, err := internal.ContextClient(ctx)
if err != nil {
- return &http.Client{Transport: internal.ErrorTransport{err}}
+ return &http.Client{Transport: internal.ErrorTransport{Err: err}}
}
return c
}