You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: openid-4-verifiable-presentations-1_0.md
+51-43
Original file line number
Diff line number
Diff line change
@@ -690,7 +690,8 @@ Credential.
690
690
691
691
`claims`:
692
692
: OPTIONAL. A non-empty array of objects as defined in (#claims_query) that specifies
693
-
claims in the requested Credential.
693
+
claims in the requested Credential. Verifiers MUST NOT point to the same claim more than
694
+
once in a single query. Wallets SHOULD ignore such duplicate claim queries.
694
695
695
696
`claim_sets`:
696
697
: OPTIONAL. A non-empty array containing arrays of identifiers for
@@ -735,17 +736,14 @@ Within the particular `claims` array, the same `id` MUST NOT
735
736
be present more than once.
736
737
737
738
`path`:
738
-
: REQUIRED if the Credential Format uses a JSON-based claims structure (e.g., IETF SD-JWT VC and W3C Verifiable Credentials); MUST NOT
739
-
be present otherwise. The value MUST be a non-empty array representing a claims path pointer that specifies the path to a claim
739
+
: REQUIRED The value MUST be a non-empty array representing a claims path pointer that specifies the path to a claim
740
740
within the Verifiable Credential, as defined in (#claims_path_pointer).
741
741
742
742
`values`:
743
743
: OPTIONAL. An array of strings, integers or boolean values that specifies the expected values of the claim.
744
744
If the `values` property is present, the Wallet SHOULD return the claim only if the
745
745
type and value of the claim both match for at least one of the elements in the array. Details of the processing rules are defined in (#selecting_claims).
746
746
747
-
The ISO mdoc specific parameters to be used in the Claims Query are defined in (#mdocs_claims_query).
748
-
749
747
### Selecting Claims and Credentials {#dcql_query_lang_processing_rules}
750
748
751
749
The following section describes the logic that applies for selecting claims
@@ -827,33 +825,36 @@ these constraints. The Wallet is not controlled by the Verifier and the Verifier
827
825
MUST perform its own security checks on the returned Credentials and
828
826
presentations.
829
827
830
-
## Claims Path Pointer {#claims_path_pointer}
828
+
# Claims Path Pointer {#claims_path_pointer}
829
+
830
+
A claims path pointer is a pointer into the Verifiable Credential, identifying one or more claims.
831
+
A claims path pointer MUST be a non-empty array of strings, nulls and non-negative integers.
832
+
A claims path pointer can be processed, which means it is applied to a credential. The results of
833
+
processing are the referenced claims.
834
+
835
+
## Semantics for JSON-based credentials
831
836
832
-
A claims path pointer is a pointer into the JSON structure of the Verifiable
833
-
Credential, identifying one or more claims. A claims path pointer MUST be a
834
-
non-empty array of strings and non-negative integers. A string value
835
-
indicates that the respective key is to be selected, a null value
837
+
This section defines the semantics of a claims path pointer when applied to a JSON-based credential.
838
+
839
+
A string value indicates that the respective key is to be selected, a null value
836
840
indicates that all elements of the currently selected array(s) are to be selected;
837
841
and a non-negative integer indicates that the respective index in an array is to be selected. The path
838
842
is formed as follows:
839
843
840
-
Start with an empty array and repeat the following until the full path is formed.
841
-
842
-
- To address a particular claim within an object, append the key (claim name)
843
-
to the array.
844
-
- To address an element within an array, append the index to the array (as a
845
-
non-negative, 0-based integer).
846
-
- To address all elements within an array, append a null value to the array.
844
+
Start with an empty array and repeat the following until the full path is formed.
847
845
848
-
Verifiers MUST NOT point to the same claim more than once in a single query.
849
-
Wallets SHOULD ignore such duplicate claim queries.
846
+
- To address a particular claim within an object, append the key (claim name)
847
+
to the array.
848
+
- To address an element within an array, append the index to the array (as a
849
+
non-negative, 0-based integer).
850
+
- To address all elements within an array, append a null value to the array.
850
851
851
852
### Processing
852
853
853
-
In detail, the array is processed by the Wallet from left to right as follows:
854
+
In detail, the array is processed from left to right as follows:
854
855
855
-
1. Select the root element of the Credential, i.e., the top-level JSON object.
856
-
2. Process the query of the claims path pointer array from left to right:
856
+
1. Select the root element of the Credential, i.e., the top-level JSON object.
857
+
2. Process the query of the claims path pointer array from left to right:
857
858
1. If the component is a string, select the element in the respective
858
859
key in the currently selected element(s). If any of the currently
859
860
selected element(s) is not an object, abort processing and return an
@@ -867,15 +868,36 @@ In detail, the array is processed by the Wallet from left to right as follows:
867
868
currently selected element(s) is not an array, abort processing and
868
869
return an error. If the index does not exist in a selected array, remove
869
870
that array from the selection.
870
-
3. If the set of elements currently selected is empty, abort processing and
871
-
return an error.
871
+
3. If the set of elements currently selected is empty, abort processing and
872
+
return an error.
873
+
874
+
The result of the processing is the set of selected JSON elements.
875
+
876
+
## Semantics for ISO mdoc-based credentials
877
+
878
+
This section defines the semantics of a claims path pointer when applied to a
879
+
credential in ISO mdoc format.
880
+
881
+
A claims path pointer into an mdoc contains two elements of type string. The
882
+
first element refers to a namespace and the second element refers to a data
883
+
element identifier.
872
884
873
-
The result of the processing is the set of elements which is requested for
874
-
presentation.
885
+
### Processing
886
+
887
+
In detail, the array is processed as follows:
888
+
889
+
1. If the claims path pointer does not contain exactly two components or
890
+
one of the components is not a string abort processing and return an error.
891
+
2. Select the namespace referenced by the first component. If the namespace does
892
+
not exist in the mdoc abort processing and return an error.
893
+
3. Select the data element referenced by the second component. If the data element does not exist
894
+
in the credential abort processing and return an error.
875
895
876
-
### Claims Path Pointer Example {#claims_path_pointer_example}
896
+
The result of the processing is the selected data element value as CBOR data item.
877
897
878
-
The following shows a non-normative, simplified example of a Credential:
898
+
## Claims Path Pointer Example {#claims_path_pointer_example}
899
+
900
+
The following shows a non-normative, simplified example of a JSON-based Credential:
879
901
880
902
```json
881
903
{
@@ -2223,20 +2245,6 @@ The following is an ISO mdoc specific parameter in the `meta` parameter in a Cre
2223
2245
doctype of the requested Verifiable Credential. It MUST
2224
2246
be a valid doctype identifier as defined in [@ISO.18013-5].
2225
2247
2226
-
#### Parameters in the Claims Query {#mdocs_claims_query}
2227
-
2228
-
The following are ISO mdoc specific parameters to be used in a Claims Query as defined in (#claims_query).
2229
-
2230
-
`namespace`:
2231
-
: REQUIRED if the Credential Format is based on the mdoc format defined in [@ISO.18013-5]; MUST NOT be present otherwise.
2232
-
The value MUST be a string that specifies the namespace of the data element
2233
-
within the mdoc, e.g., `org.iso.18013.5.1`.
2234
-
2235
-
`claim_name`:
2236
-
: REQUIRED if the Credential Format is based on mdoc format defined in [@ISO.18013-5]; MUST NOT be present otherwise.
2237
-
The value MUST be a string that specifies the data element identifier of the data element within the provided namespace
2238
-
in the mdoc, e.g., `first_name`.
2239
-
2240
2248
#### mdoc DCQL Query example
2241
2249
2242
2250
An example DCQL query using the mdoc format is shown in (#more_dcql_query_examples). The following is a non-normative example for a VP Token in the response:
@@ -2716,7 +2724,7 @@ The technology described in this specification was made available from contribut
2716
2724
[[ To be removed from the final specification ]]
2717
2725
2718
2726
-24
2719
-
2727
+
* use claims path pointer for mdoc based credentials
0 commit comments