-
Notifications
You must be signed in to change notification settings - Fork 54
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
Cred Manifest <--> Cred Application Validation #222
Conversation
credential/manifest/model.go
Outdated
} | ||
} | ||
|
||
// TODO: Path validation |
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.
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.
perhaps make sure the path exists?
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.
see comments
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.
lgtm
Codecov Report
@@ Coverage Diff @@
## main #222 +/- ##
==========================================
+ Coverage 57.76% 57.83% +0.08%
==========================================
Files 36 36
Lines 3996 4053 +57
==========================================
+ Hits 2308 2344 +36
- Misses 1304 1320 +16
- Partials 384 389 +5
|
IsValidPair validates the rules on how a credential manifest [cm] and credential application [ca] relate to each other https://identity.foundation/credential-manifest/#credential-application
The object MUST contain a manifest_id property. The value of this property MUST be the id of a valid Credential Manifest.
The following rules are enforced in the pr:
The ca must have a format property if the related Credential Manifest specifies a format property.
Its value must be a subset of the format property in the Credential Manifest that this Credential Submission
The Credential Application object MUST contain a presentation_submission property IF the related Credential Manifest contains a presentation_definition.
Its value MUST be a valid Presentation Submission:
https://identity.foundation/presentation-exchange/#presentation-submission
The presentation_submission object MUST contain a definition_id property. The value of this property MUST be the id value of a valid Presentation Definition.
The descriptor_map object MUST include a format property. The value of this property MUST be a string that matches one of the Claim Format Designation. This denotes the data format of the Claim.