Commit e841bba
fix(oauth): include client_id in token request body for client_secret_post
Per RFC 6749 §2.3.1, when using client_secret_post authentication,
both client_id and client_secret must be included in the request body.
Previously, prepare_token_auth() only added client_secret, causing
authentication failures with OAuth servers that require client_id
in the body for client_secret_post.
Fixes #2128
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 62575ed commit e841bba
File tree
2 files changed
+31
-1
lines changed- src/mcp/client/auth
- tests/client/auth/extensions
2 files changed
+31
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
206 | 206 | | |
207 | 207 | | |
208 | 208 | | |
209 | | - | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
210 | 212 | | |
211 | 213 | | |
212 | 214 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
255 | 283 | | |
256 | 284 | | |
257 | 285 | | |
| |||
0 commit comments