Skip to content

feat(httpclient): send API key via Backlog-API-Key header - #110

Merged
harehare merged 2 commits into
masterfrom
feat/api-key-header
Oct 19, 2026
Merged

harehare merged 2 commits into
masterfrom
feat/api-key-header

Conversation

@harehare

Copy link
Copy Markdown
Contributor

Replace the apiKey query parameter with the Backlog-API-Key request header in HttpClientBacklogHttpClient, so the API key no longer appears in request URLs.

@harehare
harehare marked this pull request as ready for review October 14, 2026 07:00
@harehare
harehare requested review from nullberg88 and a balanced review from Copilot October 14, 2026 07:00

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The migration is consistent across request methods, with updated assertions and no identified blocking issues.

0 open findings

What changed in this PR

Moves API-key authentication into the Backlog-API-Key header in HttpClientBacklogHttpClient, keeping credentials out of generated request URLs.

Changes:

  • Removes API-key query parameters across all request methods.
  • Adds the header through the shared request builder while preserving bearer-token fallback.
  • Updates tests to check clean URLs and the API-key header.
File Description
src/​test/​java/​com/​nulabinc/​backlog4j/​http/​httpclient/​HttpClientBacklogHttpClientTest.java Verifies URLs and authentication headers across request methods.
src/​main/​java/​com/​nulabinc/​backlog4j/​http/​httpclient/​HttpClientBacklogHttpClient.java Replaces API-key query parameters with a shared authentication header.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Replace the apiKey query parameter with the Backlog-API-Key request
header in HttpClientBacklogHttpClient, so the API key no longer appears
in request URLs.
Verify that an access token is sent via the Authorization: Bearer
header without Backlog-API-Key, and that the API key takes precedence
when both an API key and an access token are configured.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The focused change consistently updates all request methods, with corresponding authentication assertions and no unresolved findings.

0 open findings

🧠 Review effort: Balanced

@harehare
harehare merged commit 70ebdb1 into master Oct 19, 2026
2 checks passed
@katayama8000
katayama8000 deleted the feat/api-key-header branch October 21, 2026 05:40
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.

3 participants