Repository navigation
fix: allow vc+sd-jwt issuance by routing SdJwtVc to sd-jwt signing path - #454
Conversation
- Broaden SdJwt dispatch to also handle vc+sd-jwt (cred +sd-jwt accepts either format; credo passes the format through as typ header). - Preserve original format in thrown error to avoid narrowing to never. Signed-off-by: Ajay Jadhav <ajay@ayanworks.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Problem
Credential configurations using the
vc+sd-jwtformat fail issuance with:getMixedCredentialRequestToCredentialMapperinsrc/utils/oid4vc-agent.tsonly dispatchedSdJwtDc(dc+sd-jwt) tohandleSdJwtDcFormat, so anything configured asvc+sd-jwtfell through to the catch-allthrow.Change
SdJwtVc(vc+sd-jwt) through the same sd-jwt signing path asSdJwtDc(dc+sd-jwt). Credo'sOpenId4VcIssuerServiceacceptsClaimFormat.SdJwtDcsign options for either configuration format and passes the format through as the credentialtypheader.requestedFormatlocal and use it in the thrown error, so the residual error path does not narrow tonever.Scope
Single file,
src/utils/oid4vc-agent.ts— 9 insertions, 2 deletions. Follow-up to #451; supersedes the closed #452.Verification
npx tsc --noEmit -p tsconfig.build.jsonpasses.dc+sd-jwt,vc+sd-jwtandmso_mdocall pass.Summary by CodeRabbit