Skip to content

Commit e07593a

Browse files
ericchiangcodyoss
authored andcommitted
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 <[email protected]> Run-TryBot: Matt Hickford <[email protected]> Reviewed-by: Matt Hickford <[email protected]> TryBot-Result: Gopher Robot <[email protected]>
1 parent 34ffb07 commit e07593a

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ go 1.17
55
require (
66
cloud.google.com/go/compute/metadata v0.2.0
77
github.com/google/go-cmp v0.5.8
8-
golang.org/x/net v0.5.0
98
google.golang.org/appengine v1.6.7
109
)
1110

1211
require (
1312
github.com/golang/protobuf v1.5.2 // indirect
13+
golang.org/x/net v0.5.0 // indirect
1414
google.golang.org/protobuf v1.28.0 // indirect
1515
)

internal/token.go

+1-3
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ import (
1919
"strings"
2020
"sync"
2121
"time"
22-
23-
"golang.org/x/net/context/ctxhttp"
2422
)
2523

2624
// Token represents the credentials used to authorize
@@ -229,7 +227,7 @@ func RetrieveToken(ctx context.Context, clientID, clientSecret, tokenURL string,
229227
}
230228

231229
func doTokenRoundTrip(ctx context.Context, req *http.Request) (*Token, error) {
232-
r, err := ctxhttp.Do(ctx, ContextClient(ctx), req)
230+
r, err := ContextClient(ctx).Do(req.WithContext(ctx))
233231
if err != nil {
234232
return nil, err
235233
}

0 commit comments

Comments
 (0)