Skip to content

Commit

Permalink
maye fix audience
Browse files Browse the repository at this point in the history
  • Loading branch information
David Corrigan committed Apr 3, 2023
1 parent d72cfb5 commit 71f4b95
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions azuredevops/provider.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package azuredevops

import (
"bytes"
"context"
"encoding/base64"
"encoding/json"
Expand Down Expand Up @@ -271,14 +272,13 @@ func getGitHubOIDCToken(d *schema.ResourceData) (string, error) {
query.Add("audience", audience)
parsedUrl.RawQuery = query.Encode()

req, err := http.NewRequest("POST", parsedUrl.String(), nil)
req, err := http.NewRequest("POST", parsedUrl.String(), bytes.NewBuffer(nil))
if err != nil {
return "", err
}

req.Header.Add("Authorization", "Bearer "+requestToken)
req.Header.Add("Accept", "application/json")
req.Header.Add("api-version", "2.0")

response, err := client.Do(req)
if err != nil {
Expand Down

0 comments on commit 71f4b95

Please sign in to comment.