Skip to content

Commit e89a1ab

Browse files
committed
v2: fix URL building in oauthConfig
The new logic keeps the double slash in https:// as opposed to truncating it to https:/ Updates #cleanup Signed-off-by: Percy Wegmann <[email protected]>
1 parent 34e007d commit e89a1ab

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

v2/oauth.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ package tsclient
66
import (
77
"context"
88
"net/http"
9-
"path"
109

1110
"golang.org/x/oauth2/clientcredentials"
1211
)
@@ -33,7 +32,7 @@ func (ocfg OAuthConfig) HTTPClient() *http.Client {
3332
ClientID: ocfg.ClientID,
3433
ClientSecret: ocfg.ClientSecret,
3534
Scopes: ocfg.Scopes,
36-
TokenURL: path.Join(baseURL, "/api/v2/oauth/token"),
35+
TokenURL: baseURL + "/api/v2/oauth/token",
3736
}
3837

3938
// Use context.Background() here, since this is used to refresh the token in the future.

0 commit comments

Comments
 (0)