Skip to content

Conversation

@jlowin
Copy link
Owner

@jlowin jlowin commented Oct 29, 2025

Fixes #2298

Adds the missing OIDCProxy import and export to the auth module's __init__.py file. This allows users to import OIDCProxy directly from fastmcp.server.auth instead of requiring the full path fastmcp.server.auth.oidc_proxy.OIDCProxy.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • OpenID Connect authentication proxy functionality is now available as part of the public API.

Fixes #2298

Co-authored-by: Jeremiah Lowin <jlowin@users.noreply.github.com>
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 29, 2025

Walkthrough

OIDCProxy is now imported from the oidc_proxy module and added to the public API exports in the auth module's __init__.py, making it accessible to users of the fastmcp library.

Changes

Cohort / File(s) Summary
Module Public API Export
src/fastmcp/server/auth/__init__.py
Imported OIDCProxy from .oidc_proxy module and added it to the __all__ list to expose it as part of the module's public API

Poem

🐰 A proxy for OIDC now hops into the light,
No longer hidden from user's sight,
Exported with care in __all__'s embrace,
FastMCP's auth finds its proper place! ✨

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The pull request description provides a clear explanation of the change and includes a reference to the related issue (#2298) and an AI tool attribution note. However, the description is incomplete compared to the required template—it lacks the "Contributors Checklist" and "Review Checklist" sections with their respective checkbox items that are specified in the repository's template. While the core description content is helpful and on-topic, the missing checklist sections prevent the description from fully meeting the template requirements.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The pull request title "Add OIDCProxy to auth module exports" accurately and concisely describes the main change in the changeset. The title directly communicates that OIDCProxy is being added to the auth module's public API exports, which is precisely what the code changes accomplish according to the raw summary. The phrasing is clear and specific enough for developers scanning commit history to understand the primary objective.
Linked Issues Check ✅ Passed The code changes directly address all objectives from linked issue #2298. The raw summary confirms that OIDCProxy has been imported from .oidc_proxy in the init.py file and that "OIDCProxy" has been added to the all export list. These two changes satisfy both primary requirements: exposing OIDCProxy at the package level and including it in the public API so users can import it directly from fastmcp.server.auth instead of requiring the full module path. The implementation aligns perfectly with the issue's stated requirements.
Out of Scope Changes Check ✅ Passed All changes in this pull request are directly in scope with respect to the linked issue #2298. The raw summary indicates only modifications to src/fastmcp/server/auth/init.py, specifically adding the OIDCProxy import and updating the all list. Both of these changes are explicitly required by the issue objectives and there are no extraneous modifications to other files or unrelated functionality introduced in this changeset.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch claude/issue-2298-20251029-1802

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1ca53b4 and 2e3b002.

📒 Files selected for processing (1)
  • src/fastmcp/server/auth/__init__.py (2 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
src/**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

Use Python ≥ 3.10 and provide full type annotations for library code

Files:

  • src/fastmcp/server/auth/__init__.py
**/*.py

📄 CodeRabbit inference engine (AGENTS.md)

Never use bare except; always catch specific exception types

Files:

  • src/fastmcp/server/auth/__init__.py
🧬 Code graph analysis (1)
src/fastmcp/server/auth/__init__.py (1)
src/fastmcp/server/auth/oidc_proxy.py (1)
  • OIDCProxy (172-384)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Run tests: Python 3.10 on windows-latest
  • GitHub Check: Run tests with lowest-direct dependencies
🔇 Additional comments (2)
src/fastmcp/server/auth/__init__.py (2)

10-10: LGTM!

The import statement correctly follows the existing pattern and properly exposes OIDCProxy from the oidc_proxy module.


19-19: LGTM!

The addition of "OIDCProxy" to __all__ correctly exposes it as part of the module's public API and maintains alphabetical ordering.


Comment @coderabbitai help to get the list of available commands and usage tips.

@marvin-context-protocol marvin-context-protocol bot added bug Something isn't working. Reports of errors, unexpected behavior, or broken functionality. auth Related to authentication (Bearer, JWT, OAuth, WorkOS) for client or server. labels Oct 29, 2025
@jlowin jlowin merged commit e2d317e into main Oct 29, 2025
13 checks passed
@jlowin jlowin deleted the claude/issue-2298-20251029-1802 branch October 29, 2025 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auth Related to authentication (Bearer, JWT, OAuth, WorkOS) for client or server. bug Something isn't working. Reports of errors, unexpected behavior, or broken functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OIDC Proxy Implementation is missing the declaration in the __init__.py

2 participants