Skip to content
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

Introduce new query language (Approach 1) #220

Closed
wants to merge 15 commits into from
Closed
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions examples/query_lang/credentials_alternatives.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"rules": {
"required": 2,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed on editors' call: add mapping to "and" and "or"

"from": [
{ "ref": "pid" },
{
"required": 1,
"from": [
{ "ref": "pid_reduced" },
{ "ref": "residence_info" }
]
}
]
},
"credentials": {
"pid": {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how would someone specify claims from different formats?
if that is allowed, we should have an example.
if not allowed, then it seems the format property can be extracted to a higher level.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, an example should be added. The other formats would just be separate credential request objects.

"format": "vc+sd-jwt",
"vct_values": ["https://credentials.example.com/identity_credential"],
"claims": [
{ "path": ["last_name"] },
{ "path": ["first_name"] },
danielfett marked this conversation as resolved.
Show resolved Hide resolved
{ "path": ["address", "street_address"] }
]
},
"pid_reduced": {
"format": "vc+sd-jwt",
"vct_values": ["https://credentials.example.com/identity_credential"],
"claims": [
{ "path": ["last_name"] },
{ "path": ["first_name"] }
danielfett marked this conversation as resolved.
Show resolved Hide resolved
]
},
"residence_info": {
"format": "vc+sd-jwt",
"vct_values": ["https://credentials.example.com/residence_credential"],
"claims": [
{ "path": ["zip_code"] },
{ "path": ["city"] },
{ "path": ["state"] }
danielfett marked this conversation as resolved.
Show resolved Hide resolved
]
}
}
}
42 changes: 42 additions & 0 deletions examples/query_lang/multi_credentials.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"credentials": {
"pid": {
"format": "vc+sd-jwt",
"vc+sd-jwt": {
"vct_values": [ "https://example.com/personal_identity" ]
},
"purpose": [{
"lang": "en-US",
"text": "To prove the identity of the holder"
}],
"claims": [
{ "path": [ "last_name" ] },
decentralgabe marked this conversation as resolved.
Show resolved Hide resolved
{ "path": [ "first_name" ] },
danielfett marked this conversation as resolved.
Show resolved Hide resolved
{ "path": [ "address", "street_address" ] }
]
},
"degree": {
"format": "vc+sd-jwt",
"vc+sd-jwt": {
"vct_values": [ "https://example.com/education_credential" ]
},
"claims": [
{ "path": [ "last_name" ] },
{ "path": [ "first_name" ] },
danielfett marked this conversation as resolved.
Show resolved Hide resolved
{ "path": [ "degree" ] }
]
},
"residence": {
"format": "vc+sd-jwt",
"vc+sd-jwt": {
"vct_values": [ "https://example.com/residence_proof" ]
},
"claims": [
{ "path": [ "last_name" ] },
{ "path": [ "first_name" ] },
{ "path": [ "city" ] },
{ "path": [ "state" ] }
danielfett marked this conversation as resolved.
Show resolved Hide resolved
]
}
}
}
41 changes: 41 additions & 0 deletions examples/query_lang/nested_claim_queries.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"credentials": {
"my_cred_1": {
"format": "vc+sd-jwt",
"vc+sd-jwt": {
"vct_values": [ "https://credentials.example.com/identity_credential" ],
"alg_values": [ "ES256", "ES384" ],
"sd_alg_values": [ "SHA-256" ]
},
"purpose": [{
"lang": "en-US",
"text": "To prove the identity of the holder"
},
{
"lang": "no-NO",
"text": "For å bevise innehaverens identitet"
},
{
"lang": "jp-JP",
"text": "保持者の身元を証明するため"
}
],
"claims": [
{ "path": [ "last_name" ] },
{
"required": 1,
"from": [
{ "path": [ "zip_code" ] },
{
"required": 2,
"from": [
{ "path": [ "city" ] },
{ "path": [ "state" ] }
danielfett marked this conversation as resolved.
Show resolved Hide resolved
]
}
]
}
]
}
}
}
17 changes: 17 additions & 0 deletions examples/query_lang/simple.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"credentials": {
"my_cred_1": {
"format": "vc+sd-jwt",
"vc+sd-jwt": {
"vct_values": [ "https://credentials.example.com/identity_credential" ],
"alg_values": ["ES256", "ES384"],
"sd_alg_values": ["SHA-256"]
},
"claims":[
{ "path": ["last_name"] },
{ "path": ["first_name"] },
danielfett marked this conversation as resolved.
Show resolved Hide resolved
{ "path": ["address", "street_address"] }
]
}
}
}
22 changes: 22 additions & 0 deletions examples/query_lang/simple_mdoc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"credentials": {
"my_mdoc_credential": {
"format": "mso_mdoc",
"mso_mdoc": {
"doctype_values": "org.iso.7367.1.mVR",
"alg_values": [ "EdDSA" ],
"hash_algorithm_values": [ "SHA-384"]
},
"claims": [
{
"namespace": "org.iso.7367.1",
"claim_name": "vehicle_holder"
},
{
"namespace": "org.iso.18013.5.1",
"claim_name": "first_name"
danielfett marked this conversation as resolved.
Show resolved Hide resolved
}
]
}
}
}
Loading
Loading