Added in fixes found during manual testing of Azure import.

Change-Id: Icf21d58732fdf4e3caaca015bc10d84613d0f423
This commit is contained in:
Patrick Jones
2021-02-10 17:39:58 -08:00
parent 66670185b0
commit f9a44934e9
4 changed files with 11 additions and 4 deletions

View File

@@ -43,6 +43,9 @@ func (cs urlCredentialSource) subjectToken() (string, error) {
if err != nil {
return "", fmt.Errorf("oauth2/google: invalid body in subject token URL query: %v", err)
}
if c := resp.StatusCode; c < 200 || c > 299 {
return "", fmt.Errorf("oauth2/google: status code %d: %s", c, string(tokenBytes))
}
switch cs.Format.Type {
case "json":