-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
expect transformCredentialInput to move top-level props of W3C credentials inside vc #73
Comments
Excellent question. @awoie do you have an opinion here? |
Also,
Result
|
yes, and the same for the presentation transforms. Also it loosely relates to #64 since it relates to JWT-JSON payload conversion. |
Hey, I explicitly fixed the code to handle 'credentialStatus', 'evidence' and 'termsOfUse' correctly. A more general refactor of these conversion functions should be addressed in #64 |
* Explicitly map `credentialStatus`, `termsOfUse` and `evidence` between between JWT and W3C VC representations. * tests: extended test coverage fixes #73
🎉 This issue has been resolved in version 2.1.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Based on my reading of the W3C spec, it seems as though top-level optional props like
evidence
andcredentialSubject
should be copied inside thevc
claim in the resulting JWT encoded credential.However, when you pass
transformCredentialInput
an arg of typeCredentialPayload
they are copied to the top level of the JWT:Results in
Expect
A workaround is to move the props inside a manually constructed
vc
object. But then it's unclear whether all of the props should be manually transformed to match theJwtCredentialPayload
type or left for the transformation function to handle.The text was updated successfully, but these errors were encountered: