control, ipn, tailcfg: remove golang.org/x/oauth2 dep, add tailcfg.Oauth2Token

golang.org/x/oauth2 pulls in App Engine and grpc module dependencies,
screwing up builds that depend on this module.

Some background on the problem:
https://go.googlesource.com/proposal/+/master/design/36460-lazy-module-loading.md

Fixes tailscale/corp#1471

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick
2021-03-19 10:21:33 -07:00
committed by Brad Fitzpatrick
parent 7b57310966
commit 0a02aaf813
13 changed files with 49 additions and 352 deletions

View File

@@ -8,8 +8,8 @@ import (
"log"
"time"
"golang.org/x/oauth2"
"tailscale.com/ipn/ipnstate"
"tailscale.com/tailcfg"
"tailscale.com/types/netmap"
)
@@ -46,7 +46,7 @@ func (b *FakeBackend) StartLoginInteractive() {
b.login()
}
func (b *FakeBackend) Login(token *oauth2.Token) {
func (b *FakeBackend) Login(token *tailcfg.Oauth2Token) {
b.login()
}