-
Notifications
You must be signed in to change notification settings - Fork 321
WIP: Authorization Support (Using ASP.NET Core Native AuthN/AuthZ Integration) #377
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
localden
wants to merge
131
commits into
main
Choose a base branch
from
localden/experimental
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,970
−11
Open
Changes from 99 commits
Commits
Show all changes
131 commits
Select commit
Hold shift + click to select a range
0bd80e6
Experimental changes in a different direction
localden ac14bb2
Fix build issues
localden e8d9a23
Cleanup
localden 4b3f9f7
Cleanup
localden 8c790db
Tweaks to logic
localden b9ba2b9
Update Program.cs
localden 47f1937
Cleanup
localden 638bd35
Update HttpMcpServerBuilderExtensions.cs
localden d1f30f8
Tweaks to config
localden 3713da6
Server configuration
localden 9582111
Update based on feedback
localden 8b89c2d
Pop the browser open - implement that in the SDK
localden c67ef6c
Tweaks to handles
localden a439840
Mock handler
localden 932e678
Make sure I am not introducing unexpected changes
localden 2151d00
Rename projects
localden 3bfc258
Update sample project name and location
localden 70146dd
Make sure definitions are not changed
localden ec25187
Functionality consolidation
localden a3926ee
Fix name
localden 405db57
Organize things better
localden a0486d3
Cleanup
localden cc2f570
Update samples/ProtectedMCPServer/Program.cs
localden 4e0b508
Update samples/ProtectedMCPServer/Program.cs
localden 32f7b16
Update src/ModelContextProtocol.AspNetCore/Auth/McpAuthorizationExten…
localden b5728d0
Update samples/AspNetCoreSseServer/Program.cs
localden 487bbd7
Update src/ModelContextProtocol.AspNetCore/Auth/McpAuthorizationExten…
localden 22b7bcc
Update src/ModelContextProtocol.AspNetCore/Auth/McpAuthorizationExten…
localden a433f5a
Contextual rename
localden 31f8ce9
Added overload for custom scheme
localden 48bff9c
Introduce proper constants
localden 991b29b
Simplify the handling of the WWW-Authenticate implementaiton
localden 5c28b62
Update Program.cs
localden 1a1e48c
Remove no longer used entity
localden 008f521
Move to its own file.
localden 6e23f4a
Placeholder setup
localden ff8a2b7
Fix server devx
localden 03438d2
Defaults are applied here - no need to redeclare
localden a4f2495
Proper authorization configuration
localden 2cdee6e
Simplify defaults
localden e79dcb8
Update McpEndpointRouteBuilderExtensions.cs
localden 7903c75
Update Program.cs
localden fbb1817
Simplify tool configuration
localden 6aef68b
Update config
localden 1fd164c
Proper setup
localden 0badaf8
Update McpAuthenticationHandler.cs
localden 9209b61
Update samples
localden a90d01e
Consolidate some of the PKCE logic.
localden f3a3715
Consolidate some OAuth logic
localden e044475
Update McpAuthenticationHandler.cs
localden 8790a35
Clean up the helper
localden 4cff084
Minor changes to PRM doc logic
localden 6b768d8
Cleanup
localden e3c5c21
Remove unused namespaces
localden d77368d
Placeholder for events
localden 32f2265
Simplify policy setup
localden 67342cd
Policy setup
localden b37a7b9
Escaping
localden 583de65
Update server configuration
localden 5f15bce
Validation.
localden 7c33562
Delegate Base64 encoding to a more performant implementation
localden 8d4c0c4
Make sure we're consistent
localden 55bb471
Implement refresh token logic
localden debdb67
Stripping out the client implementation - this needs to be re-thought
localden 003f5a0
Standardize namespacing
localden ceee919
Updating the approach for client auth
localden 51bb38b
Cleanup for client logic
localden afd05af
Cleanup
localden a0fbec6
Simplify client logic
localden 4073efd
Complete PRM doc properties. Update for consistency
localden 2e06f59
Update for consistency
localden 2d7da73
Work on the basic OAuth implementation in sample
localden 10cf1f7
Token acquisition logic
localden 2f84981
Update token logic
localden 6768089
Significantly more basic provider implementation
localden cbb5c36
Working client-server interaction
localden 0aeec19
Cleanup
localden 531370a
Simplification
localden d511312
Cleanup for consistency
localden 1496b41
Update with better DevEx
localden 6b0b7ef
Cleanup
localden a9acba8
Delete AuthorizationServerUtils.cs
localden f8650f9
Cleanup
localden d4cc3ad
Multiple scheme support
localden 31f611a
Multi-scheme support
localden 3852be9
Cleaner implementation
localden 8f926ba
Redundant call
localden b501d23
Merge branch 'main' into localden/experimental
localden c92343c
Update src/ModelContextProtocol/Authentication/AuthorizationDelegatin…
localden c57b85c
Update src/ModelContextProtocol/Authentication/AuthorizationDelegatin…
localden bb25dbd
Update src/ModelContextProtocol/Authentication/AuthorizationDelegatin…
localden 291c7ec
Update src/ModelContextProtocol.AspNetCore/Authentication/McpAuthenti…
localden d72221d
Update src/ModelContextProtocol.AspNetCore/Authentication/McpAuthoriz…
localden 2945083
Clean up scheme checks
localden 26f44de
Use ConfigureAwait
localden ca0cdf3
Fix LINQ issue. Simplify best scheme match check
localden 45c4b30
Proper array caching
localden 627e1e4
Update 401 handling logic. Remove pragma warning silencing.
localden 8903c42
Update based on feedback
localden a0275ea
Update the HttpClient configuration
localden 05e3550
Update for cleanup
localden e8f7012
Update McpAuthenticationHandler.cs
localden 94c39bc
No direct inclusion of HTTP client factory
localden 0504aee
Remove legacy packages
localden 7ac5c4a
Update signature and make test explicit
localden 7b6c9fd
URL check
localden c406230
Changes based on feedback
localden b8954b3
Update to use a HttpClientFactory
localden 0b030c2
Update McpAuthenticationHandler.cs
localden 7c6e406
Update based on feedback
localden 9420013
Update McpAuthenticationOptions.cs
localden 4fbf2e9
Update McpAuthenticationOptions.cs
localden 22962cf
Minor optimizations to the delegating handler
localden 5c94158
Update AuthorizationDelegatingHandler.cs
localden 0abea22
Update AuthorizationHelpers.cs
localden 58a7a3d
Update AuthorizationHelpers.cs
localden b3b8168
Update AuthorizationHelpers.cs
localden aad7ad5
Update AuthorizationHelpers.cs
localden 43eb6ff
Add record support for unauthorized result
localden 9a4cea0
Update BasicOAuthAuthorizationProvider.cs
localden b3766aa
Update ProtectedResourceMetadata.cs
localden bc1566e
Proper check for resource metadata
localden 0857b94
Update AuthorizationHelpers.cs
localden a40325d
.NET Standard 2.0 compatibility fix
localden a0cd4ad
Naming consistency
localden fe0d8ba
Update for consistency
localden 0ff4ac4
Update src/ModelContextProtocol/Authentication/AuthorizationDelegatin…
localden 3b46c8d
Update src/ModelContextProtocol/Protocol/Transport/SseClientTransport…
localden 8c6e1dc
Merge branch 'main' into localden/experimental
localden 3602c66
Merge branch 'main' into localden/experimental
localden 5980c9a
Update src/ModelContextProtocol/Authentication/AuthorizationDelegatin…
localden File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,4 +80,7 @@ docs/api | |
|
||
# Rider | ||
.idea/ | ||
.idea_modules/ | ||
.idea_modules/ | ||
|
||
# Misc project metadata | ||
.specs/ |
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
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
Oops, something went wrong.
Oops, something went wrong.
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.