Skip to content

Conversation

@fasteiner
Copy link
Owner

Added

  • Core: support OAuth client credentials authentication via client_id and client_secret in XurrentApiHelper while maintaining API key compatibility.
  • Core: OAuth token endpoint TLD is now dynamically derived from the API base URL, ensuring the same top-level domain is used for both API and OAuth.
  • Core: When using OAuth, if a 401 Unauthorized error is received, the token is automatically refreshed and the API call is retried once.

fasteiner and others added 3 commits October 1, 2025 19:49
…auto-refreshing tokens on 401 errors; update README and CHANGELOG accordingly.
…for-xurrent

Add OAuth client credentials support to API helper
@fasteiner fasteiner requested a review from EkriirkE October 9, 2025 13:51
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting

@fasteiner fasteiner marked this pull request as draft October 9, 2025 13:58
@fasteiner fasteiner marked this pull request as ready for review October 9, 2025 14:10
@fasteiner
Copy link
Owner Author

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting

Comment on lines +51 to +62
def fake_request(method, url, headers=None, json=None):
api_responses.append({"method": method, "url": url, "headers": headers, "json": json})
response = MagicMock()
response.status_code = 200
response.ok = True
response.json.return_value = {"result": "ok"}
response.headers = {}
return response

monkeypatch.setattr(requests, "post", fake_post)
monkeypatch.setattr(requests, "request", fake_request)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Monkeypatched requests function never runs

Both OAuth tests replace requests.request, but XurrentApiHelper.api_call always uses the helper’s requests.Session (self.__session.request). The monkeypatch therefore never intercepts the call and the tests will perform a real HTTP request to api.example.com, causing them to fail or require network access. Patch requests.Session.request (or the helper’s session) instead so the tests stay hermetic and exercise the code path.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants