Create North Auth Provider for General FastMCP Usage #41
+3,758
−613
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.

Design Document: https://www.notion.so/cohereai/MCP-North-Auth-Provider-3024398375db80398ce3e8e7ab828604
Changes:
src/north_mcp_python_sdk/__init__.pyNorthMCPServerto use FastMCP server as superclassNorthTokenVerifierauth provider (this provider automatically applies middleware, so removed the manual middleware injection)src/north_mcp_python_sdk/auth.pyget_authenticated_useras deprecated (subject to change in design doc)get_authenticated_usernow creates a user object from the access tokenAuthContextMiddleware(no longer required to attach user to context, instead use built in access token dependency injection)_parse_connector_tokensto use implementation from feat: FastMCPNorthMiddleware for easier FastMCP integration #29_create_authenticated_usernow creates a baseAuthenticatedUserinstead of customAuthenticatedNorthUserNorthTokenVerifierAuthProviderpatternNorthAuthBackendused to handle key authenticationverify_tokenmethod is required to be defined from superclass, but in our implementation the auth backend does not call the token verifier function and instead implements this itself