oauth2: remove direct dependency on golang.org/x/net
Change-Id: If8fd952f4bfd3bac3e85592a49616adf4b43ce51 Reviewed-on: https://go-review.googlesource.com/c/oauth2/+/460764 Reviewed-by: Cody Oss <codyoss@google.com> Run-TryBot: Matt Hickford <matt.hickford@gmail.com> Reviewed-by: Matt Hickford <matt.hickford@gmail.com> TryBot-Result: Gopher Robot <gobot@golang.org>
This commit is contained in:
@@ -19,8 +19,6 @@ import (
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"golang.org/x/net/context/ctxhttp"
|
||||
)
|
||||
|
||||
// Token represents the credentials used to authorize
|
||||
@@ -229,7 +227,7 @@ func RetrieveToken(ctx context.Context, clientID, clientSecret, tokenURL string,
|
||||
}
|
||||
|
||||
func doTokenRoundTrip(ctx context.Context, req *http.Request) (*Token, error) {
|
||||
r, err := ctxhttp.Do(ctx, ContextClient(ctx), req)
|
||||
r, err := ContextClient(ctx).Do(req.WithContext(ctx))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user