Improve testability of the OAuth client pipeline
- RelyingParty: document why this module deviates from the project's
HttpClient seam (it talks to a real fake-AS over genuine HTTP, and
do_authorize needs a redirect-following policy distinct from the
rest of the RP). Build the redirect-disabled client once at
construction time as a new http_no_redirect field instead of
rebuilding it on every do_authorize call.
- Extract pure helpers from discovery::run (evaluate_https_metadata_response,
evaluate_loopback_metadata, HttpsFetchOutcome) and from
RelyingParty::discover_as (parse_as_descriptor). Add 12 new unit
tests covering network failures, status-code branches, content-type
edge cases, missing-required-field cases, and non-URL endpoints —
paths previously only reachable through the integration suite.
- Add proptest as a dev-dependency and pin the cryptographic roundtrip
invariants documented in src/common/CLAUDE.md as property tests:
multikey encode/parse roundtrip (k256 + p256), AnySignature::to_jws_bytes
always 64 bytes, sign_prehash/verify_prehash roundtrip, JWT
encode_compact/verify_compact roundtrip, ES256 sign/verify roundtrip.
Keys are seeded from a 32-byte proptest input via ChaCha20Rng so
shrunk failures are reproducible from the seed alone.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>