Commit 579a6be
Include client_id in client_credentials token request body
ClientCredentialsOAuthProvider._exchange_token_client_credentials() was
missing client_id in the token_data dict. Per RFC 6749 Section 2.3.1,
when using client_secret_post authentication, both client_id and
client_secret must be in the request body. The prepare_token_auth()
method only adds client_secret, so client_id was never sent.
This caused authentication failures when using client_secret_post
with OAuth providers that require client_id in the body.
Fixes #2128
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 528abfa commit 579a6be
2 files changed
Lines changed: 3 additions & 0 deletions
File tree
- src/mcp/client/auth/extensions
- tests/client/auth/extensions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| 93 | + | |
93 | 94 | | |
94 | 95 | | |
95 | 96 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
| 252 | + | |
252 | 253 | | |
253 | 254 | | |
254 | 255 | | |
| |||
272 | 273 | | |
273 | 274 | | |
274 | 275 | | |
| 276 | + | |
275 | 277 | | |
276 | 278 | | |
277 | 279 | | |
| |||
0 commit comments