Commit f3d2f53
committed
### Code Review Fixes
**Round 1 - Initial Review:**
- ✅ Added ID-JAG expiry tracking to prevent stale tokens
- ✅ Enhanced audience override with WARNING level logging
- ✅ Documented error handling delegation pattern
- ✅ Added metadata stability documentation
- ✅ Fixed empty scope handling with strip() check
- ✅ Added negative JWT decode tests
**Round 2 - Systematic Review:**
- ✅ Made ID-JAG expiry configurable (DEFAULT_ID_JAG_EXPIRY_SECONDS = 900)
- ✅ Added comprehensive thread safety documentation.
- ✅ Moved time import to module level
- ✅ Extracted magic numbers to constants
- ✅ Enhanced logging with default expiry notifications
**Round 3 - Final Fixes:**
- ✅ Changed validation exceptions to OAuthFlowError for consistency
- ✅ Added edge case test for oauth_metadata=None
- ✅ Fixed critical bug: instance variable vs class constant
### Test Coverage
**Statistics:**
- 43 test cases covering all code paths
- 100% code coverage (166 statements, 44 branches)
- Edge cases: expired tokens, malformed JWT, HTTP errors, empty scope
- Conformance test integration: `auth/cross-app-access-complete-flow`
### Breaking Changes
**None.** All changes are backward compatible with optional parameters.1 parent e2f3136 commit f3d2f53
File tree
5 files changed
+812
-84
lines changed- .github/actions/conformance
- examples/snippets/clients
- src/mcp/client/auth/extensions
- tests/client/auth
5 files changed
+812
-84
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
414 | 414 | | |
415 | 415 | | |
416 | 416 | | |
417 | | - | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
418 | 420 | | |
419 | 421 | | |
420 | 422 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2630 | 2630 | | |
2631 | 2631 | | |
2632 | 2632 | | |
| 2633 | + | |
| 2634 | + | |
2633 | 2635 | | |
2634 | 2636 | | |
2635 | 2637 | | |
| |||
2646 | 2648 | | |
2647 | 2649 | | |
2648 | 2650 | | |
| 2651 | + | |
2649 | 2652 | | |
2650 | 2653 | | |
2651 | 2654 | | |
2652 | 2655 | | |
2653 | 2656 | | |
2654 | 2657 | | |
2655 | 2658 | | |
| 2659 | + | |
| 2660 | + | |
| 2661 | + | |
| 2662 | + | |
| 2663 | + | |
| 2664 | + | |
| 2665 | + | |
| 2666 | + | |
| 2667 | + | |
| 2668 | + | |
| 2669 | + | |
| 2670 | + | |
| 2671 | + | |
| 2672 | + | |
| 2673 | + | |
| 2674 | + | |
| 2675 | + | |
| 2676 | + | |
| 2677 | + | |
| 2678 | + | |
| 2679 | + | |
| 2680 | + | |
| 2681 | + | |
| 2682 | + | |
| 2683 | + | |
| 2684 | + | |
| 2685 | + | |
| 2686 | + | |
| 2687 | + | |
| 2688 | + | |
| 2689 | + | |
| 2690 | + | |
| 2691 | + | |
| 2692 | + | |
| 2693 | + | |
| 2694 | + | |
| 2695 | + | |
| 2696 | + | |
| 2697 | + | |
| 2698 | + | |
2656 | 2699 | | |
2657 | 2700 | | |
2658 | 2701 | | |
| |||
Lines changed: 43 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
| 191 | + | |
| 192 | + | |
191 | 193 | | |
192 | 194 | | |
193 | 195 | | |
| |||
204 | 206 | | |
205 | 207 | | |
206 | 208 | | |
| 209 | + | |
207 | 210 | | |
208 | 211 | | |
209 | 212 | | |
210 | 213 | | |
211 | 214 | | |
212 | 215 | | |
213 | 216 | | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
214 | 257 | | |
215 | 258 | | |
0 commit comments