FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Remove `lstrip` in each OAuth endpoint by hongkunyoo · Pull Request #770 · modelcontextprotocol/python-sdk · GitHub

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
8 changes: 4 additions & 4 deletions src/mcp/server/auth/routes.py
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
Expand Up @@ -167,10 +167,10 @@ def build_metadata(
revocation_options: RevocationOptions,
) -> OAuthMetadata:
authorization_url = modify_url_path(
issuer_url, lambda path: path.rstrip("/") + AUTHORIZATION_PATH.lstrip("/")
issuer_url, lambda path: path.rstrip("/") + AUTHORIZATION_PATH
)
token_url = modify_url_path(
issuer_url, lambda path: path.rstrip("/") + TOKEN_PATH.lstrip("/")
issuer_url, lambda path: path.rstrip("/") + TOKEN_PATH
)
# Create metadata
metadata = OAuthMetadata(
Expand All @@ -194,13 +194,13 @@ def build_metadata(
# Add registration endpoint if supported
if client_registration_options.enabled:
metadata.registration_endpoint = modify_url_path(
issuer_url, lambda path: path.rstrip("/") + REGISTRATION_PATH.lstrip("/")
issuer_url, lambda path: path.rstrip("/") + REGISTRATION_PATH
)

# Add revocation endpoint if supported
if revocation_options.enabled:
metadata.revocation_endpoint = modify_url_path(
issuer_url, lambda path: path.rstrip("/") + REVOCATION_PATH.lstrip("/")
issuer_url, lambda path: path.rstrip("/") + REVOCATION_PATH
)
metadata.revocation_endpoint_auth_methods_supported = ["client_secret_post"]

Expand Down

Back | FazBrowse Home | New Git URL