Skip to content

Commit

Permalink
add examples of mandatory and clarify its description (#139)
Browse files Browse the repository at this point in the history
4 approvals. open for more than a week. no objections to merge during the DCP WG call. 

* add examples of mandatory and clarify the description

* make explicit what it means when sent to false

* Apply suggestions from code review

Co-authored-by: Oliver Terbu <43441584+awoie@users.noreply.github.com>

* Apply suggestions from code review

---------

Co-authored-by: Kristina <=>
Co-authored-by: Oliver Terbu <43441584+awoie@users.noreply.github.com>
  • Loading branch information
Sakurann and awoie authored Dec 14, 2023
1 parent d5118a8 commit 17f6bfc
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions examples/credential_metadata_jwt_vc_json.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
},
"degree": {},
"gpa": {
"mandatory": true,
"display": [
{
"name": "GPA"
Expand Down
1 change: 1 addition & 0 deletions examples/credential_metadata_ldp_vc.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
},
"degree": {},
"gpa": {
"mandatory": true,
"display": [
{
"name": "GPA"
Expand Down
4 changes: 3 additions & 1 deletion examples/credential_metadata_mso_mdoc.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@
}
]
},
"birth_date": {}
"birth_date": {
"mandatory": true
}
},
"org.iso.18013.5.1.aamva": {
"organ_donor": {}
Expand Down
6 changes: 3 additions & 3 deletions openid-4-verifiable-credential-issuance-1_0.md
Original file line number Diff line number Diff line change
Expand Up @@ -1841,7 +1841,7 @@ The following additional Credential Issuer metadata are defined for this Credent
* `credential_definition`: REQUIRED. Object containing the detailed description of the Credential type. It consists at least of the following two sub claims:
* `type`: REQUIRED. Array designating the types a certain Credential type supports according to [@VC_DATA], Section 4.3.
* `credentialSubject`: OPTIONAL. An object containing a list of name/value pairs, where each name identifies a claim offered in the Credential. The value can be another such object (nested data structures), or an array of such objects. To express the specifics about the claim, the most deeply nested value MAY be an object that includes a following non-exhaustive list of parameters defined by this specification:
* `mandatory`: OPTIONAL. Boolean which when set to `true` indicates the claim MUST be present in the issued Credential. If the `mandatory` property is omitted its default should be assumed to be `false`.
* `mandatory`: OPTIONAL. Boolean which, when set to `true`, indicates that the Credential Issuer will always include this claim in the issued Credential. If set to `false`, the claim is not included in the issued Credential if the wallet did not request the inclusion of the claim, and/or if the Credential Issuer chose to not include the claim. If the `mandatory` parameter is omitted, the default should be assumed to be `false`.
* `value_type`: OPTIONAL. String value determining the type of value of the claim. A non-exhaustive list of valid values defined by this specification are `string`, `number`, and image media types such as `image/jpeg` as defined in IANA media type registry for images (https://www.iana.org/assignments/media-types/media-types.xhtml#image).
* `display`: OPTIONAL. An array of objects, where each object contains display properties of a certain claim in the Credential for a certain language. Below is a non-exhaustive list of valid parameters that MAY be included:
* `name`: OPTIONAL. String value of a display name for the claim.
Expand Down Expand Up @@ -1904,7 +1904,7 @@ The following additional Credential Issuer metadata are defined for this Credent
* `@context`: REQUIRED. Array as defined in [@VC_DATA], Section 4.1.
* `type`: REQUIRED. Array designating the types a certain credential type supports according to [@VC_DATA], Section 4.3.
* `credentialSubject`: OPTIONAL. An object containing a list of name/value pairs, where each name identifies a claim offered in the Credential. The value can be another such object (nested data structures), or an array of such objects. To express the specifics about the claim, the most deeply nested value MAY be an object that includes a following non-exhaustive list of parameters defined by this specification:
* `mandatory`: OPTIONAL. Boolean which when set to `true` indicates the claim MUST be present in the issued Credential. If the `mandatory` property is omitted its default should be assumed to be `false`.
* `mandatory`: OPTIONAL. Boolean which, when set to `true`, indicates that the Credential Issuer will always include this claim in the issued Credential. If set to `false`, the claim is not included in the issued Credential if the wallet did not request the inclusion of the claim, and/or if the Credential Issuer chose to not include the claim. If the `mandatory` parameter is omitted, the default should be assumed to be `false`.
* `value_type`: OPTIONAL. String value determining the type of value of the claim. A non-exhaustive list of valid values defined by this specification are `string`, `number`, and image media types such as `image/jpeg` as defined in IANA media type registry for images (https://www.iana.org/assignments/media-types/media-types.xhtml#image).
* `display`: OPTIONAL. An array of objects, where each object contains display properties of a certain claim in the Credential for a certain language. Below is a non-exhaustive list of valid parameters that MAY be included:
* `name`: OPTIONAL. String value of a display name for the claim.
Expand Down Expand Up @@ -1995,7 +1995,7 @@ The following additional Credential Issuer metadata are defined for this Credent

* `doctype`: REQUIRED. String identifying the Credential type as defined in [@!ISO.18013-5].
* `claims`: OPTIONAL. An object containing a list of name/value pairs, where the name is a certain `namespace` as defined in [@!ISO.18013-5] (or any profile of it), and the value is an object. This object also contains a list of name/value pairs, where the name is a claim name value that is defined in the respective namespace and is offered in the Credential. The value is an object detailing the specifics of the claim with the following non-exhaustive list of parameters that MAY be included:
* `mandatory`: OPTIONAL. Boolean which when set to `true` indicates the claim MUST be present in the issued Credential. If the `mandatory` property is omitted its default should be assumed to be `false`.
* `mandatory`: OPTIONAL. Boolean which, when set to `true`, indicates that the Credential Issuer will always include this claim in the issued Credential. If set to `false`, the claim is not included in the issued Credential if the wallet did not request the inclusion of the claim, and/or if the Credential Issuer chose to not include the claim. If the `mandatory` parameter is omitted, the default should be assumed to be `false`.
* `value_type`: OPTIONAL. String value determining the type of value of the claim. A non-exhaustive list of valid values defined by this specification are `string`, `number`, and image media types such as `image/jpeg` as defined in IANA media type registry for images (https://www.iana.org/assignments/media-types/media-types.xhtml#image).
* `display`: OPTIONAL. An array of objects, where each object contains display properties of a certain claim in the Credential for a certain language. Below is a non-exhaustive list of valid parameters that MAY be included:
* `name`: OPTIONAL. String value of a display name for the claim.
Expand Down

0 comments on commit 17f6bfc

Please sign in to comment.