Skip to content

feat: Add session support for mcp#17

Open
jawad-khan wants to merge 1 commit into
foss-mainfrom
jawad/mcp-auth-fixes
Open

feat: Add session support for mcp#17
jawad-khan wants to merge 1 commit into
foss-mainfrom
jawad/mcp-auth-fixes

Conversation

@jawad-khan
Copy link
Copy Markdown

Description

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Improvement (change that would cause existing functionality to not work as expected)
  • Code refactoring
  • Performance improvements
  • Documentation update

Screenshots and Media (if applicable)

Test Scenarios

References

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds session-based authentication support to the public v1 API layer by updating the shared base API view classes to accept session cookies in addition to API keys.

Changes:

  • Add BaseSessionAuthentication to BaseAPIView.authentication_classes
  • Add BaseSessionAuthentication to BaseViewSet.authentication_classes

Comment on lines 51 to 53
class BaseAPIView(TimezoneMixin, GenericAPIView, ReadReplicaControlMixin, BasePaginator):
authentication_classes = [APIKeyAuthentication]
authentication_classes = [BaseSessionAuthentication, APIKeyAuthentication]

Comment on lines 168 to 172
class BaseViewSet(TimezoneMixin, ReadReplicaControlMixin, ModelViewSet, BasePaginator):
model = None

authentication_classes = [APIKeyAuthentication]
authentication_classes = [BaseSessionAuthentication, APIKeyAuthentication]
permission_classes = [
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants