mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-07 08:26:10 +00:00
Merge pull request #2 from Eric84626/feature/add_grant_type_for_mcp_register_api
fix: added additional grant type into oauth_authorization_server resp…
This commit is contained in:
commit
c1954952c6
3 changed files with 4 additions and 3 deletions
|
|
@ -447,7 +447,7 @@ async def oauth_authorization_server_mcp(
|
|||
"authorization_endpoint": authorization_endpoint,
|
||||
"token_endpoint": token_endpoint,
|
||||
"response_types_supported": ["code"],
|
||||
"grant_types_supported": ["authorization_code"],
|
||||
"grant_types_supported": ["authorization_code", "refresh_token"],
|
||||
"code_challenge_methods_supported": ["S256"],
|
||||
"token_endpoint_auth_methods_supported": ["client_secret_post"],
|
||||
# Claude expects a registration endpoint, even if we just fake it
|
||||
|
|
|
|||
|
|
@ -354,7 +354,7 @@ async def test_register_client_remote_registration_success():
|
|||
|
||||
request_payload = {
|
||||
"client_name": "Litellm Proxy",
|
||||
"grant_types": ["authorization_code"],
|
||||
"grant_types": ["authorization_code", "refresh_token"],
|
||||
"response_types": ["code"],
|
||||
"token_endpoint_auth_method": "client_secret_post",
|
||||
}
|
||||
|
|
@ -603,6 +603,7 @@ async def test_oauth_authorization_server_respects_x_forwarded_proto():
|
|||
assert response["authorization_endpoint"].startswith("https://litellm.example.com/")
|
||||
assert response["token_endpoint"].startswith("https://litellm.example.com/")
|
||||
assert response["registration_endpoint"].startswith("https://litellm.example.com/")
|
||||
assert response["grant_types_supported"] == ["authorization_code", "refresh_token"]
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ export const useMcpOAuthFlow = ({
|
|||
if (!hasPreconfiguredCredentials) {
|
||||
const registration = await registerMcpOAuthClient(accessToken, serverId, {
|
||||
client_name: temporaryPayload.alias || temporaryPayload.server_name || serverId,
|
||||
grant_types: ["authorization_code"],
|
||||
grant_types: ["authorization_code", "refresh_token"],
|
||||
response_types: ["code"],
|
||||
token_endpoint_auth_method:
|
||||
temporaryPayload.credentials && temporaryPayload.credentials.client_secret ? "client_secret_post" : "none",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue