fix: restore SD+JWT credentials from backup - #623
Conversation
6f38838 to
e524e26
Compare
Head branch was pushed to by a user without write access
elribonazo
left a comment
There was a problem hiding this comment.
Please respect the PR template, its mandatory
@elribonazo Apologies , I would be extra vigilant regarding pr template now onwards. |
…s#458) When backing up SD+JWT credentials, only the JWT ID field was being stored instead of the full SDJWT JWS. This caused restore to fail because SDJWTCredential.fromJWS() expects the complete JWS including disclosures. Changes: - Modified Backup.ts to reconstruct full SDJWT JWS from JWT + disclosures - Updated tests to use correct data format for SDJWT restore - Added SDJWT to round-trip backup/restore test - Exported credential JWS strings from fixtures for test use Fixes hyperledger-identus#458 Signed-off-by: A-Chronicle <chaubeyanshika319@gmail.com>
The import path was incorrect - ../../../ only goes back to pluto/, but we need ../../../../ to reach src/ and then access pollux/. Signed-off-by: A-Chronicle <chaubeyanshika319@gmail.com>
…g backup - Add proper type assertions and validation for credential data - Handle disclosure objects with _encoded property format - Improve SDJWT JWS reconstruction logic - Add SDJWT with disclosures test fixture and test coverage - Replace import type with runtime import for Domain error classes Signed-off-by: A-Chronicle <chaubeyanshika319@gmail.com>
a754494 to
60dec1d
Compare
|
@elribonazo I've addressed all the feedback:
This is ready for re-review. Thanks! |
|



Description
Fixes #458 - Backup/restore was broken for SD+JWT credentials. The backup function stored only the JWT ID field instead of the full SDJWT JWS (jwt
disclosure1disclosure2~...), causing restore to fail sinceSDJWTCredential.fromJWS()needs the complete JWS including disclosures to properly recreate the credential.Alternatives Considered (optional)
N/A
Checklist