Commit cd1cbc4
Proxy OAuth endpoints through MCP server in legacy auth test
Update CanAuthenticate_WithLegacyServerWithoutProtectedResourceMetadata to
use McpServerUrl for auth metadata endpoints and proxy OAuth requests to the
real OAuth server, matching the pattern used by the endpoint fallback test.
Update TestOAuthServer RequireResource=false to reject requests that include
a resource parameter, ensuring the client correctly omits it in legacy mode.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent ee81c54 commit cd1cbc4
File tree
2 files changed
+55
-8
lines changed- tests
- ModelContextProtocol.AspNetCore.Tests/OAuth
- ModelContextProtocol.TestOAuthServer
2 files changed
+55
-8
lines changedLines changed: 46 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1064 | 1064 | | |
1065 | 1065 | | |
1066 | 1066 | | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
1067 | 1070 | | |
1068 | 1071 | | |
1069 | 1072 | | |
| |||
1073 | 1076 | | |
1074 | 1077 | | |
1075 | 1078 | | |
1076 | | - | |
| 1079 | + | |
1077 | 1080 | | |
1078 | 1081 | | |
1079 | 1082 | | |
| |||
1082 | 1085 | | |
1083 | 1086 | | |
1084 | 1087 | | |
1085 | | - | |
1086 | | - | |
1087 | | - | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
1088 | 1091 | | |
1089 | 1092 | | |
1090 | 1093 | | |
| |||
1094 | 1097 | | |
1095 | 1098 | | |
1096 | 1099 | | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
| 1133 | + | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
1097 | 1139 | | |
1098 | 1140 | | |
1099 | 1141 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
72 | 75 | | |
73 | 76 | | |
74 | 77 | | |
| |||
297 | 300 | | |
298 | 301 | | |
299 | 302 | | |
300 | | - | |
301 | | - | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
302 | 306 | | |
303 | 307 | | |
304 | 308 | | |
| |||
344 | 348 | | |
345 | 349 | | |
346 | 350 | | |
347 | | - | |
| 351 | + | |
| 352 | + | |
348 | 353 | | |
349 | | - | |
| 354 | + | |
350 | 355 | | |
351 | 356 | | |
352 | 357 | | |
| |||
0 commit comments