mcp: Add client-side scope accumulation#944
Open
guglielmo-san wants to merge 18 commits intomainfrom
Open
Conversation
…dentials handlers to support incremental step-up authorization
…horization code flow
… in client credentials provider
…scopes and refactor test helper invocation
…andlers and use sorted slice comparisons in tests
… clear token source on error
…ested scopes during step-up authorization
…ient credentials flow
…d ClientCredentialsHandler constructors
| // UnionScopes returns the union of the existing and challenged scope sets. | ||
| // It is used during step-up authorization to accumulate scopes across | ||
| // authorization rounds (SEP-2350). | ||
| func UnionScopes(existing, challenged []string) []string { |
Contributor
There was a problem hiding this comment.
I don't think we want to export these functions publicly. Maybe it's a good moment to start the internal/authutils package (or something of similar name) to put such things there? It would also allow us to remove the current duplication we discussed.
Contributor
Author
There was a problem hiding this comment.
Created internals/authutil
Will proceed with the refactoring of duplicated methods in a separate PR
Co-authored-by: Maciej Kisiel <mkisiel@google.com>
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.
Description
This PR implements modelcontextprotocol/modelcontextprotocol#2350
Fixes #943