Skip to content
This repository was archived by the owner on Apr 18, 2026. It is now read-only.

feat(agent): extend createAgentHttpClient() with auth and add discoverAuthProviders()#179

Merged
runyaga merged 2 commits into
feat/agent-http-client-factoryfrom
feat/agent-auth-http-client
Mar 18, 2026
Merged

feat(agent): extend createAgentHttpClient() with auth and add discoverAuthProviders()#179
runyaga merged 2 commits into
feat/agent-http-client-factoryfrom
feat/agent-auth-http-client

Conversation

@91jaeminjo
Copy link
Copy Markdown
Collaborator

Summary

  • Extend createAgentHttpClient() with getToken and tokenRefresher parameters, composing the full decorator stack (Observable → Authenticated → Refreshing) internally
  • Assert that tokenRefresher requires getToken
  • Add discoverAuthProviders() wrapper that hides HttpTransport from consumers
  • Un-hide TokenRefresher, TokenRefreshResult, TokenRefreshSuccess, TokenRefreshFailure, and TokenRefreshService from the barrel

Stacked on #178.

Test plan

  • dart format . --set-exit-if-changed — no changes
  • dart analyze --fatal-infos — 0 issues
  • dart test test/http/ — 14/14 pass (6 factory + 2 discover + 6 auth)
  • Auth assertion test — tokenRefresher without getToken throws AssertionError
  • Close cascades through full auth decorator stack

🤖 Generated with Claude Code

91jaeminjo and others added 2 commits March 18, 2026 18:30
…rAuthProviders()

Add getToken and tokenRefresher parameters to the HTTP client factory,
composing the full decorator stack (Observable → Authenticated →
Refreshing) internally. Assert that tokenRefresher requires getToken.

Add discoverAuthProviders() wrapper that hides HttpTransport from
consumers. Un-hide TokenRefresher, TokenRefreshResult, TokenRefreshSuccess,
TokenRefreshFailure, and TokenRefreshService from the barrel.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ssary import

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@runyaga runyaga merged commit 5e2a443 into feat/agent-http-client-factory Mar 18, 2026
5 checks passed
@91jaeminjo 91jaeminjo deleted the feat/agent-auth-http-client branch March 19, 2026 14:03
@91jaeminjo 91jaeminjo restored the feat/agent-auth-http-client branch March 19, 2026 14:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants