Integration Patterns
Recommended backend patterns for @gwop/sdk
Recommended backend patterns for @gwop/sdk
These patterns show the smallest production-minded backend shape for a Gwop integration:
Your backend owns the API surface and business rules. Gwop owns identity, invoices, sessions, JWKS, and webhook signatures.
sid for a live session check when revocation matters.These patterns are demonstrated end-to-end in the Agentrouter sample app, a headless LLM store built on @gwop/sdk.
Bootstrap one client and keep identity request options explicit
Create challenges, exchange them for JWTs, and manage sessions
Verify access tokens locally and refresh JWKS on key rotation
Create invoices and carry both IDs through your app model
Validate signed deliveries before mutating local state