Commit f4875f2
Add validation and null-forgiving operators to BasicAuth handler registration
- Added null-forgiving operators (!) to BasicAuthUsername and BasicAuthPassword
- Added validation to ensure both username and password are provided together
- Throws InvalidOperationException if only one credential is configured
- Prevents silently falling back to PassThroughHandler on misconfiguration
- Uses XOR operator (^) to detect partial configuration
This ensures users get clear error messages when BasicAuth is misconfigured
instead of silently failing to authenticate.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 54cda1d commit f4875f2
1 file changed
Lines changed: 12 additions & 3 deletions
Lines changed: 12 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
90 | 100 | | |
91 | | - | |
92 | | - | |
| 101 | + | |
93 | 102 | | |
94 | | - | |
| 103 | + | |
95 | 104 | | |
96 | 105 | | |
97 | 106 | | |
| |||
0 commit comments