Skip to content

Commit

Permalink
fix: authenticate with X-Bearer header
Browse files Browse the repository at this point in the history
  • Loading branch information
robinmuhia committed Jul 19, 2024
1 parent 3955926 commit 7967ccf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ func (s *client) MakeRequest(ctx context.Context, method, path string, queryPara
request.Header.Set("Content-Type", "application/json")

if authorised {
request.Header.Set("Authorization", fmt.Sprintf("Bearer %s", s.accessToken))
request.Header.Set("Authorization", fmt.Sprintf("X-Bearer %s", s.accessToken))
}

if queryParams != nil {
Expand Down
2 changes: 1 addition & 1 deletion models.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type ResultsResponse struct {
}

// TokenResponse is the data in the API response when logging in
// The access token is used as the bearer token when making API requests
// The access token is used as the X-bearer token when making API requests
// The refresh token is used to obtain a new access token when it expires
type TokenResponse struct {
Refresh string `json:"refresh"`
Expand Down

0 comments on commit 7967ccf

Please sign in to comment.