Skip to content

Commit

Permalink
oauth2: remove direct dependency on golang.org/x/net
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
ericchiang authored and codyoss committed Jan 11, 2023
1 parent 34ffb07 commit e07593a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ go 1.17
require (
cloud.google.com/go/compute/metadata v0.2.0
github.com/google/go-cmp v0.5.8
golang.org/x/net v0.5.0
google.golang.org/appengine v1.6.7
)

require (
github.com/golang/protobuf v1.5.2 // indirect
golang.org/x/net v0.5.0 // indirect
google.golang.org/protobuf v1.28.0 // indirect
)
4 changes: 1 addition & 3 deletions internal/token.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ import (
"strings"
"sync"
"time"

"golang.org/x/net/context/ctxhttp"
)

// Token represents the credentials used to authorize
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit e07593a

Please sign in to comment.