Skip to content

Commit

Permalink
Add header auth to callbacks (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomshutt committed Aug 16, 2022
1 parent 4d1416e commit 72f19b3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions clients/callback_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ func NewCallbackClient() CallbackClient {
}

func (c CallbackClient) DoWithRetries(r *retryablehttp.Request) error {
// TODO: Replace with a proper shared Secret, probably coming from the initial request
r.Header.Set("Authorization", "Bearer IAmAuthorized")

resp, err := c.httpClient.Do(r)
if err != nil {
return fmt.Errorf("failed to send callback to %q. Error: %s", r.URL.String(), err)
Expand Down

0 comments on commit 72f19b3

Please sign in to comment.