| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
2 issues found across 3 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="docs/client/session-groups.md">
<violation number="1" location="docs/client/session-groups.md:83">
P2: Copying this example raises `NameError` for `client_metadata`, `token_storage`, `redirect_handler`, and `callback_handler`; define these values or link a complete runnable OAuth example.</violation>
<violation number="2" location="docs/client/session-groups.md:98">
P2: When the same auth object is assigned to two parameter instances, `ClientSessionGroup` shares its mutable OAuth context and tokens. Tell users to construct a distinct auth instance per server before claiming these lifecycles are independent.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Sorry, something went wrong.
|
|
||
| server_auth = OAuthClientProvider( | ||
| server_url="https://api.example.com", | ||
| client_metadata=client_metadata, |
There was a problem hiding this comment.
P2: Copying this example raises NameError for client_metadata, token_storage, redirect_handler, and callback_handler; define these values or link a complete runnable OAuth example.
Prompt for AI agentsCheck if this issue is valid — if so, understand the root cause and fix it. At docs/client/session-groups.md, line 83:
<comment>Copying this example raises `NameError` for `client_metadata`, `token_storage`, `redirect_handler`, and `callback_handler`; define these values or link a complete runnable OAuth example.</comment>
<file context>
@@ -70,6 +70,33 @@ If you already hold a connected `ClientSession` (`Client.session` is one), hand
+
+server_auth = OAuthClientProvider(
+ server_url="https://api.example.com",
+ client_metadata=client_metadata,
+ storage=token_storage,
+ redirect_handler=redirect_handler,
</file context>
Sorry, something went wrong.
| await group.connect_to_server(server_params) | ||
| ``` | ||
|
|
||
| Because `auth` is configured per `ServerParameters` instance, each server in the session group maintains independent authentication context, scopes, and token-refresh lifecycle. Custom headers can still be supplied alongside `auth` via `headers=`. |
There was a problem hiding this comment.
P2: When the same auth object is assigned to two parameter instances, ClientSessionGroup shares its mutable OAuth context and tokens. Tell users to construct a distinct auth instance per server before claiming these lifecycles are independent.
Prompt for AI agentsCheck if this issue is valid — if so, understand the root cause and fix it. At docs/client/session-groups.md, line 98:
<comment>When the same auth object is assigned to two parameter instances, `ClientSessionGroup` shares its mutable OAuth context and tokens. Tell users to construct a distinct auth instance per server before claiming these lifecycles are independent.</comment>
<file context>
@@ -70,6 +70,33 @@ If you already hold a connected `ClientSession` (`Client.session` is one), hand
+ await group.connect_to_server(server_params)
+```
+
+Because `auth` is configured per `ServerParameters` instance, each server in the session group maintains independent authentication context, scopes, and token-refresh lifecycle. Custom headers can still be supplied alongside `auth` via `headers=`.
+
## Recap
</file context>
| Because `auth` is configured per `ServerParameters` instance, each server in the session group maintains independent authentication context, scopes, and token-refresh lifecycle. Custom headers can still be supplied alongside `auth` via `headers=`. | |
| Because `auth` is configured per `ServerParameters` instance, give each server a distinct auth instance to maintain independent authentication context, scopes, and token-refresh lifecycle. Custom headers can still be supplied alongside `auth` via `headers=`. |
Sorry, something went wrong.
There was a problem hiding this comment.
All reported issues were addressed across 1 file (changes from recent commits).
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Sorry, something went wrong.
…anch misreporting
| Back | FazBrowse Home | New Git URL |
Closes #1723
Summary
ClientSessionGroup server parameters (SseServerParameters and StreamableHttpParameters) lacked an auth field, requiring users to manually manage bearer tokens via the headers parameter and preventing automated OAuth flows (like OAuthClientProvider) with dynamic client registration and token refresh.
This change adds an optional auth: httpx2.Auth | None = None parameter to both HTTP server parameter models and propagates it into sse_client() and create_mcp_http_client().
Changes
Backward Compatibility
100% backward compatible:
Test Plan