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 all 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": ["given_name"] },
{ "path": ["family_name"] },
{ "path": ["address", "street_address"] }
]
},
"pid_reduced": {
"format": "vc+sd-jwt",
"vct_values": ["https://credentials.example.com/identity_credential"],
"claims": [
{ "path": ["family_name"] },
{ "path": ["given_name"] }
]
},
"residence_info": {
"format": "vc+sd-jwt",
"vct_values": ["https://credentials.example.com/residence_credential"],
"claims": [
{ "path": ["postal_code"] },
{ "path": ["locality"] },
{ "path": ["region"] }
]
}
}
}
38 changes: 38 additions & 0 deletions examples/query_lang/multi_credentials.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"credentials": {
"pid": {
"format": "vc+sd-jwt",
"vc+sd-jwt": {
"vct_values": [ "https://example.com/personal_identity" ]
},
"claims": [
{ "path": [ "last_name" ] },
decentralgabe marked this conversation as resolved.
Show resolved Hide resolved
{ "path": [ "given_name" ] },
{ "path": [ "address", "street_address" ] }
]
},
"degree": {
"format": "vc+sd-jwt",
"vc+sd-jwt": {
"vct_values": [ "https://example.com/education_credential" ]
},
"claims": [
{ "path": [ "family_name" ] },
{ "path": [ "given_name" ] },
{ "path": [ "degree" ] }
]
},
"residence": {
"format": "vc+sd-jwt",
"vc+sd-jwt": {
"vct_values": [ "https://example.com/residence_proof" ]
},
"claims": [
{ "path": [ "family_name" ] },
{ "path": [ "given_name" ] },
{ "path": [ "locality" ] },
{ "path": [ "region" ] }
]
}
}
}
28 changes: 28 additions & 0 deletions examples/query_lang/nested_claim_queries.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"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" ] },
{
"required": 1,
"from": [
{ "path": [ "postal_code" ] },
{
"required": 2,
"from": [
{ "path": [ "locality" ] },
{ "path": [ "region" ] }
]
}
]
}
]
}
}
}
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": ["family_name"] },
{ "path": ["given_name"] },
{ "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