-
Notifications
You must be signed in to change notification settings - Fork 516
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
Fix DIFPresFormatHandler returning invalid V20PresExRecord on presentation verification #1645
Fix DIFPresFormatHandler returning invalid V20PresExRecord on presentation verification #1645
Conversation
I agree that this should be fixed, but I wonder if changing the format in a patch release would cause issues for existing controllers. @ianco maybe? |
I've seen multiple codebases that do |
Just to avoid confusion: This fix does not change the type of -Sorry, I should probably have opened another issue to bring up the question about changing it to bool in the long run. |
Okay, I think this is probably reasonable to change then. If existing controllers are checking for |
Codecov Report
@@ Coverage Diff @@
## main #1645 +/- ##
=======================================
Coverage 95.50% 95.50%
=======================================
Files 528 528
Lines 32736 32737 +1
=======================================
+ Hits 31264 31265 +1
Misses 1472 1472 |
@andrewwhitehead -- given your last comment, is this OK to merge? Could you provide a line or two about what to put into the release notes about this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per the comments and that this is for W3C VC use cases, approving this.
I think this change is ok, controllers that do case-sensitive compares of the |
We noticed that a
V20PresExRecord
which is returned by the present-proof v2.0/verify-presentation
endpoint does not match its schema when DIF format is used to request a presentation. Because of this, parsing it into a Kotlin class fails:com.squareup.moshi.JsonDataException: Expected one of [true, false] but was True at path $.verified
Fixed this by applying json.dumps() when setting
pres_ex_record.verified
- just like it's done in the indy handler.However, couldn't
verified
be a boolean instead of a string? I found comments in the schema and in the indy handler saying it has to be a string to be used as a tag (that was my takeaway at least ;) ), but I couldn't find where it is actually declared or used that way.Signed-off-by: Roman Reinert [email protected]