Skip to content

docs: lead the request-boundary docs with the FromHTTP constructors - #518

Merged
osanderson merged 2 commits into
mainfrom
docs/architecture-fromhttp
Oct 2, 2026
Merged

osanderson merged 2 commits into
mainfrom
docs/architecture-fromhttp

Conversation

@osanderson

@osanderson osanderson commented Oct 2, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

This is DevX follow-up item 4: the docs now lead with the convenience APIs rather than explaining the by-hand approach first.

ARCHITECTURE.md:

  • "Raw request boundary" explained FormRequestFromHTTP and the DPoP and peer-certificate helpers. It didn't mention the per-request constructors that read all of them at once:

    • PushAuthorizationRequestFromHTTP
    • TokenEndpointRequestFromHTTP
    • BeginBackchannelAuthenticationRequestFromHTTP
    • BeginAuthorizationRequestFromHTTP
    • resource.VerifyRequestFromHTTP

    A new paragraph names them as the recommended path, says why (a struct filled field by field compiles with a field left out), and gives the 400 invalid_request behaviour from fix(server): answer an unreadable form body as invalid_request #512 and fix(resource): refuse a request with more than one Authorization header #513.

  • Rule 8 showed VerifyRequest{Method, URL, Authorization, DPoPProofs} without PeerCertificate. It now includes it and shows resource.VerifyRequestFromHTTP(r, target) with the fixed-URL rule.

GETTING_STARTED.md:

  • The consent section explained binding the handle and keeping the interaction by hand, then mentioned that server/interactioncookie does both. It now leads with the package ("Carry the interaction to the form's submission"), with a short New/Set/Read/Clear sketch matching feat(server): say when an interaction expires, and expire its cookie then #516's signatures.
  • The two by-hand rules follow, for an app keeping the interaction in a server-side session. The binding rule gains the replaced-interaction caveat: tie the form to the handle it was rendered for.

🤖 Generated with Claude Code

@osanderson
osanderson force-pushed the docs/architecture-fromhttp branch from 135e336 to 5347985 Compare October 2, 2026 07:05
@codecov

codecov Bot commented Oct 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

osanderson and others added 2 commits October 2, 2026 15:10
…tors

The raw request boundary section described FormRequestFromHTTP and the
DPoP and peer-certificate helpers, but not the per-request constructors
that read them all at once. Those are what a net/http adapter should
use, because a struct filled field by field compiles with a field left
out. Rule 8 showed VerifyRequest without PeerCertificate and didn't
mention VerifyRequestFromHTTP. Both now do, along with the 400
invalid_request a malformed request gets.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The section explained binding the handle and keeping the interaction by
hand, and only then mentioned that server/interactioncookie does both.
It now leads with the package and a short sketch of New/Set/Read/Clear.
The by-hand rules follow, for a server-side session, including tying
the form to the handle it was rendered for.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@osanderson
osanderson force-pushed the docs/architecture-fromhttp branch from 5347985 to bf3d27a Compare October 2, 2026 07:10
@sonarqubecloud

sonarqubecloud Bot commented Oct 2, 2026

Copy link
Copy Markdown

@osanderson
osanderson merged commit 6a2cb13 into main Oct 2, 2026
17 checks passed
@osanderson
osanderson deleted the docs/architecture-fromhttp branch October 2, 2026 07:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant