Commit a1bfd19
fix: hash private API key before lookup to match stored HMAC value (#155)
Private keys are HMAC-hashed with API_KEY_SECRET before storage in
createApiKey(), but authenticateWithPrivateKey() was comparing the raw
key against the hashed DB value, causing all private key auth to fail.
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 4fbb6ac commit a1bfd19
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
| |||
313 | 315 | | |
314 | 316 | | |
315 | 317 | | |
316 | | - | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
317 | 321 | | |
318 | 322 | | |
319 | 323 | | |
| |||
0 commit comments