-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit eec52f5
test: add comprehensive tests for protocol version propagation and resourceMetadataUrl functionality
This commit adds 21 new comprehensive test cases to verify the OAuth authentication
enhancements from commit bb23147, covering:
1. Protocol Version Propagation Tests:
- Custom protocol version headers in protected resource metadata discovery
- Custom protocol version headers in OAuth metadata discovery
- Default protocol version usage when not specified
- CORS fallback behavior with protocol versions
- Protocol version propagation through full auth flow
2. Custom Resource Metadata URL Tests:
- Custom URL routing instead of default well-known locations
- Custom URLs combined with protocol version headers
- Various URL format handling (ports, query params, fragments, localhost)
- CORS fallback with custom URLs
3. Integration Tests:
- Resource validation working correctly with new parameters
- Fallback behavior when metadata fails
- Token exchange flow with protocol version propagation
- Token refresh flow with protocol version propagation
- All parameters working together in complex scenarios
4. Edge Case Tests:
- Edge case protocol versions (old dates, future dates, suffixes, empty strings)
- Various custom URL formats (ports, query params, fragments, localhost)
- Combined CORS fallback scenarios
All tests maintain compatibility with existing functionality and ensure no regressions.
Fixed duplicate variable declaration issue in auth.ts discovered during testing.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>1 parent bb23147 commit eec52f5Copy full SHA for eec52f5
File tree
Expand file treeCollapse file tree
2 files changed
+1212
-1
lines changedOpen diff view settings
Filter options
- src/client
Expand file treeCollapse file tree
2 files changed
+1212
-1
lines changedOpen diff view settings
0 commit comments