OAuth Update: Adding the Client Credentials & Token Exchange Grant Types#882
Closed
SoldierSacha wants to merge 225 commits intomodelcontextprotocol:mainfrom
Closed
OAuth Update: Adding the Client Credentials & Token Exchange Grant Types#882SoldierSacha wants to merge 225 commits intomodelcontextprotocol:mainfrom
SoldierSacha wants to merge 225 commits intomodelcontextprotocol:mainfrom
Conversation
…for-oauth-client-credentials Add OAuth client credentials grant
…mplement-client-credentials-support Fix auth registration for client credentials
…mentation-of-client-credentials-flow Refactor auth helper methods
Fix failing tests and pyright
…eerror-in-pytest-test-case Fix OAuth tests using async fixtures
Fix resumption token update logic
Author
Author
Add OAuth token exchange support
…change-implementation-for-test-failures Fix token exchange metadata tests
Reported-by: sachabaniassad
Fix pyright case issues in tests and example
…ix-coverage-threshold-failure-1ymhhc Revert "Add branch coverage tests for OAuth metadata and refresh handling"
…e-threshold-failure-ooo725 Add token exchange metadata fallbacks and refresh match coverage
…verage-failure-ymrkqj Add unit tests for streamable HTTP SSE handling
…-inconsistent-test-coverage-on-windows Add coverage pragmas for Windows resumption paths
…onflicts-in-oauth2.py-and-test_auth.py Fix OAuth2 merge conflicts in auth flow
…or-in-legacy-server-tests Fix OAuth discovery fallbacks for legacy servers
…tible-method-override-errors Align OAuth metadata handler return types
…se-failure-in-oauth-flow Fix OAuth metadata handler stub in auth flow test
5 tasks
Contributor
|
Closing in favor of #1663 |
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.
Motivation and Context
#881
In addition to implementing the Client Credentials grant (as referenced in the issue linked above), I have also integrated support for the Token Exchange grant.
Reasoning for Token Exchange: While the Client Credentials grant is suitable for machine-to-machine authorization, I realized that there are times where the client machine (acting as an MCP Client) might have to make requests on behalf of an end-user to the MCP Server. With that being said, in the current implementation, this did not exist because there was no way to securely identify the end-user.
Now it does through Token Exchange.
How Has This Been Tested?
Added test cases (all pass), and also currently using in my own mcp server and client. Everything is working as intended.
Breaking Changes
None
Types of changes
Checklist
Additional context
No