feat(framework): Allow task token in appio token auth interceptors#7068
feat(framework): Allow task token in appio token auth interceptors#7068danieljanes merged 4 commits intomainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f07350d730
ℹ️ 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 "@codex address that feedback".
There was a problem hiding this comment.
Pull request overview
Enables AppIo token auth interceptors to accept task tokens (in addition to existing run-bound app tokens) and exposes the authenticated task ID to downstream RPC handlers.
Changes:
- Extend
AppIoTokenServerInterceptorto authenticate viastate.get_task_id_by_token(token)when run-token validation fails, and store the resolved task ID in aContextVar. - Tighten
AppIoTokenClientInterceptorbehavior to reject outbound calls that already include the app-token header (instead of replacing it). - Add/adjust unit tests and export
get_authenticated_task_idfrom the interceptors package.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
framework/py/flwr/supercore/interceptors/appio_token_interceptor.py |
Adds task-token auth path, ContextVar-backed task ID accessor, and stricter outbound metadata handling. |
framework/py/flwr/supercore/interceptors/appio_token_interceptor_test.py |
Updates client-interceptor expectations and adds a server-interceptor test asserting task-token auth sets task ID context. |
framework/py/flwr/supercore/interceptors/__init__.py |
Re-exports get_authenticated_task_id. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.