Canonical SignerSession envelope and v0.5.0 (drop legacy exchange fields)#39
Conversation
- Added validation to reject M2M client secrets in API key exchange requests. - Introduced `mintSignerSessionFromApiKeyDirect` for direct signer session creation using API keys. - Updated response handling to normalize signer URL and access token extraction. - Refactored tests to align with new response structure and ensure proper validation of signer URLs. This update improves the API key exchange process and enhances the integration with direct signer sessions, ensuring better error handling and response consistency.
- Bump version to 0.5.0 in package.json. - Update README to reflect changes in signer URL naming convention from `signerUrl` to `signer_url`. - Refactor codebase to consistently use `signer_url` across all relevant files and interfaces. - Remove deprecated user credits functions and related types to streamline the API. This release enhances consistency in the API and improves clarity in documentation.
Remove unused GrantSource import and extract deviceExchangeResponseFromSignerSessionBody so api-key direct and facade exchange paths share one parser. Add publish-rc workflow for downstream PR consumption before 0.5.0 ships on latest.
Use a quoted heredoc and placeholder substitution so @Version tokens do not trip workflow validation on workflow_dispatch.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (15)
📝 WalkthroughWalkthroughThe PR standardizes signer exchange responses on ChangesSigner exchange and public API cleanup
Sequence Diagram(s)sequenceDiagram
participant createApiKeyExchangeHandler
participant mintSignerSessionFromApiKeyDirect
participant IssuerSignerSessionEndpoint as "/api/v1/apps/{publicClientId}/auth/api-key/signer-session"
participant deviceExchangeResponseFromSignerSessionBody
createApiKeyExchangeHandler->>mintSignerSessionFromApiKeyDirect: request direct signer-session mint
mintSignerSessionFromApiKeyDirect->>IssuerSignerSessionEndpoint: Authorization: Bearer apiKey
IssuerSignerSessionEndpoint-->>mintSignerSessionFromApiKeyDirect: signer-session JSON
mintSignerSessionFromApiKeyDirect->>deviceExchangeResponseFromSignerSessionBody: normalize access_token and signer_url
deviceExchangeResponseFromSignerSessionBody-->>createApiKeyExchangeHandler: DeviceExchangeResponse
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Remove the PR RC publish workflow and RELEASING.md section for now; we can reintroduce manual or automated RC publishing in a follow-up PR.
|



Summary by CodeRabbit
New Features
signer_urlfield.Bug Fixes
Documentation