Change-Id: I80810189246ee1d7c2dba570b7ec72899b04d265
This commit is contained in:
Patrick Jones
2021-01-25 14:12:57 -08:00
parent 990173083e
commit 0cc2c09354
2 changed files with 3 additions and 3 deletions

View File

@@ -43,11 +43,10 @@ func (its impersonateTokenSource) Token() (*oauth2.Token, error) {
Scope: its.scopes,
}
b, err := json.Marshal(reqBody)
client := oauth2.NewClient(its.ctx, its.ts)
if err != nil {
return nil, fmt.Errorf("oauth2/google: unable to marshal request: %v", err)
}
client := oauth2.NewClient(its.ctx, its.ts)
req, err := http.NewRequest("POST", its.url, bytes.NewReader(b))
if err != nil {
return nil, fmt.Errorf("oauth2/google: unable to create impersonation request: %v", err)