Skip to content

feat: add NewClientWithAccessToken for Bearer-token authentication - #87

Merged
ysyneu merged 1 commit into
feat/mcp-oauthfrom
feat/mcp-oauth-impl
Oct 8, 2026
Merged

ysyneu merged 1 commit into
feat/mcp-oauthfrom
feat/mcp-oauth-impl

Conversation

@ysyneu

@ysyneu ysyneu commented Oct 8, 2026

Copy link
Copy Markdown
Collaborator

Adds NewClientWithAccessToken(accessToken string, opts ...Option). A client built this way authenticates every request with Authorization: Bearer <token> and never adds the app_key query parameter. This covers JSON, GET and multipart upload requests.

  • NewClient is unchanged and still sends app_key.
  • Requests made through doMethodWithoutAppKey (the automation trigger fire endpoint) carry no client credential for either client kind. The per-request trigger token stays the only credential on them.

Tests: access_token_test.go uses httptest to assert the header is present and app_key is absent on each request path. It also covers NewClient regression and the empty-token error.

🤖 Generated with Claude Code

@ysyneu
ysyneu merged commit 332109b into feat/mcp-oauth Oct 8, 2026
4 checks passed
@ysyneu
ysyneu deleted the feat/mcp-oauth-impl branch October 8, 2026 10:05
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.

1 participant