You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The onramp's gate is pluggable since decdn/sponsord#19 (sponsord_onramp::gate::Gate), with Turnstile as the only built-in. A webhook needs the publisher's backend online for every download; a signed token doesn't.
Proposal
ONRAMP_GATE=jwt: the publisher's site mints a short-lived JWT for a user, and the gate page posts it as proof.
Verification keys: ONRAMP_JWT_SECRET[_FILE] (HS256) or ONRAMP_JWT_PUBLIC_KEY / a JWKS URL (ES256/EdDSA).
Required claims: exp (short, e.g. ≤ 10 min), aud = the onramp's public URL, and sub = the download key's address (client), so a token can't be replayed for another key. Optionally jti with an in-memory seen-set until exp.
The default page for this gate reads the token from the URL fragment (/fund?client=..#token=..), so the publisher can link users straight to it.
Done when
JwtGate implements Gate, with tests: valid, expired, wrong audience, wrong sub, bad signature, replay.
Activity