forked from Mirrors/oauth2
Fixing path.join for URL generation.
This commit is contained in:
parent
6d51104f2c
commit
7ffb9a8fe1
|
@ -17,7 +17,6 @@ import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"net/http"
|
"net/http"
|
||||||
"path"
|
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/golang/oauth2"
|
"github.com/golang/oauth2"
|
||||||
|
@ -104,7 +103,7 @@ func (c *ComputeEngineConfig) FetchToken(existing *oauth2.Token) (token *oauth2.
|
||||||
if c.account != "" {
|
if c.account != "" {
|
||||||
account = c.account
|
account = c.account
|
||||||
}
|
}
|
||||||
u := "http://" + path.Join("metadata/computeMetadata/v1/instance/service-accounts", account, "token")
|
u := "http://metadata/computeMetadata/v1/instance/service-accounts/" + account + "/token"
|
||||||
req, err := http.NewRequest("GET", u, nil)
|
req, err := http.NewRequest("GET", u, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue