test(oauth-client): add JWKS stage integration tests with AC3 coverage
Implements Phase 5 Task 5: complete JWKS stage integration testing with all
10 required tests covering AC3.1 through AC3.8 plus additional tests for
discovery failures and loopback clients.
Tests created:
- inline_es256_happy_jwks_passes (AC3.1)
- uri_es256_happy_jwks_passes (AC3.2)
- uri_unreachable_produces_network_error (AC3.3)
- duplicate_kids_produces_spec_violation (AC3.4)
- missing_alg_produces_spec_violation (AC3.5)
- wrong_use_produces_spec_violation (AC3.6)
- weak_alg_rs1_produces_spec_violation (AC3.7)
- public_client_skips_all_jwks (AC3.8)
- discovery_failure_blocks_jwks
- loopback_skips_all_jwks
Fixtures created under tests/fixtures/oauth_client/jwks/:
- inline_es256_happy/metadata.json (inline JWKS with ES256)
- uri_es256_happy/{metadata.json,jwks.json} (JWKS via URI)
- uri_unreachable/metadata.json (JWKS URI transport error)
- duplicate_kids/metadata.json (duplicate kid check failure)
- missing_alg/metadata.json (missing alg check failure)
- wrong_use/metadata.json (wrong use check failure)
- weak_alg_rs1/metadata.json (weak algorithm check failure)
- public_client_skipped/metadata.json (public client skips all checks)
All 10 tests pass. Snapshots pinned via insta. No regressions in existing tests.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>