Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the library to simplify import paths and improve the developer experience by updating parameter usage and eliminating redundant definitions. Key changes include reorganization of module imports, removal of the old MCPAuthConfig in favor of direct AuthServerConfig usage, and renaming of configuration classes in the middleware.
Reviewed Changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/utils/validate_server_config_test.py | Updated import paths for server configuration models |
| tests/utils/fetch_server_config_test.py | Revised import sources and parameter usage in tests |
| tests/__init__test.py | Updated test cases to use the new MCPAuth API |
| samples/server/starlette.py | Adjusted variable names and route configuration |
| mcpauth/utils/_validate_server_config.py | Updated import from models to new config location |
| mcpauth/utils/_fetch_server_config.py | Revised import and helper function call |
| mcpauth/utils/_create_verify_jwt.py | Changed leeway type and removed obsolete options |
| mcpauth/utils/init.py | Removed export of obsolete ServerMetadataPaths |
| mcpauth/types.py | Updated comments regarding exception naming |
| mcpauth/models/oauth.py | Removed redundant OAuth model definitions |
| mcpauth/models/auth_server.py | Removed merged configuration models |
| mcpauth/models/init.py | Removed obsolete model re-exports |
| mcpauth/middleware/create_bearer_auth.py | Renamed BaseBearerAuthConfig to BearerAuthConfig |
| mcpauth/config.py | Merged configuration definitions and definitions update |
| mcpauth/init.py | Updated MCPAuth to accept AuthServerConfig directly |
Comments suppressed due to low confidence (2)
tests/utils/fetch_server_config_test.py:74
- Using 'type' as a parameter name may shadow the built-in 'type'. Consider renaming it to 'auth_type' or a similar descriptive name to improve clarity.
type=AuthServerType.OAUTH,
mcpauth/config.py:3
- Duplicate import of 'BaseModel' is present. Remove the redundant import to improve code clarity and maintainability.
from pydantic import BaseModel
Codecov ReportAll modified and coverable lines are covered by tests ✅ 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.