feat(identity-webhook): live balance gate + ./balance-gate export (0.4.0)#7
feat(identity-webhook): live balance gate + ./balance-gate export (0.4.0)#7eliteprox wants to merge 5 commits into
Conversation
Add createBalanceGate / parseUsdMicros and an optional checkBalance hook on handleAuthorize so consumers can enforce live credit at sign time (483 insufficient_balance, optional expiry cap for mid-stream reauth).
Publish BalanceCheck / createBalanceGate so pymthouse can import @pymthouse/clearinghouse-identity-webhook/balance-gate.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…Y_ISSUER Allow either IDENTITY_ISSUER or OIDC_ISSUER, default OIDC_AUDIENCE to the JWT issuer, and derive OIDC_TOKEN_EXCHANGE_BASE_URL from NEXTAUTH_URL.
Composite app_*_* token exchange was collapsing mint-gate HTTP 402 (trial_credits_exhausted) to webhook status 401, so gateways could not distinguish auth failure from exhausted funds. Forward 402 / 503 and bump to 0.4.2 for publish (0.4.1 already shipped).
|
Superseded for publish by #9 (includes 402 exchange propagation + 0.4.2 bump). Closing in favor of that PR against |
|
Closed in favor of #9 (main + 0.4.2 publish). |
|



Summary
createBalanceGate/BalanceCheckand wireconfig.checkBalanceinhandleAuthorize.@pymthouse/clearinghouse-identity-webhook/balance-gateand bump package to 0.4.0.app_*_*PR.Test plan
cd identity-webhook && npm test