Skip to content

Commit

Permalink
fix: update presentation definition in examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Salvatore Laiso committed Dec 18, 2023
1 parent ab23643 commit 5908a3a
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 217 deletions.
134 changes: 27 additions & 107 deletions pyeudiw/tests/federation/schemas/test_entity_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,121 +66,41 @@
]
}
},
"presentation_definitions": [
{
"id": "pid-sd-jwt:unique_id+given_name+family_name",
"presentation_definition": {
"id": "d76c51b7-ea90-49bb-8368-6b3d194fc131",
"input_descriptors": [
{
"id": "sd-jwt",
"id": "IdentityCredential",
"format": {
"jwt": {
"alg": [
"EdDSA",
"ES256"
]
},
"constraints": {
"limit_disclosure": "required",
"fields": [
{
"path": [
"$.sd-jwt.type"
],
"filter": {
"type": "string",
"const": "PersonIdentificationData"
}
},
{
"path": [
"$.sd-jwt.cnf"
],
"filter": {
"type": "object",
}
},
{
"path": [
"$.sd-jwt.family_name"
],
"intent_to_retain": "true"
},
{
"path": [
"$.sd-jwt.given_name"
],
"intent_to_retain": "true"
},
{
"path": [
"$.sd-jwt.unique_id"
],
"intent_to_retain": "true"
"vc+sd-jwt": {}
},
"constraints": {
"limit_disclosure": "required",
"fields": [
{
"path": [
"$.vct"
],
"filter": {
"type": "string",
"const": "IdentityCredential"
}
]
}
},
{
"path": [
"$.family_name"
]
},
{
"path": [
"$.given_name"
]
}
]
}
}
]
},
{
"id": "mDL-sample-req",
"input_descriptors": [
{
"id": "mDL",
"format": {
"mso_mdoc": {
"alg": [
"EdDSA",
"ES256"
]
},
"constraints": {
"limit_disclosure": "required",
"fields": [
{
"path": [
"$.mdoc.doctype"
],
"filter": {
"type": "string",
"const": "org.iso.18013.5.1.mDL"
}
},
{
"path": [
"$.mdoc.namespace"
],
"filter": {
"type": "string",
"const": "org.iso.18013.5.1"
}
},
{
"path": [
"$.mdoc.family_name"
],
"intent_to_retain": "false"
},
{
"path": [
"$.mdoc.portrait"
],
"intent_to_retain": "false"
},
{
"path": [
"$.mdoc.driving_privileges"
],
"intent_to_retain": "false"
}
]
}
}
}
]
}
],

"default_max_age": 1111,

Expand Down
35 changes: 34 additions & 1 deletion pyeudiw/tests/federation/test_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,40 @@
'request_uris': [],
'redirect_uris': [],
'default_acr_values': [],
'presentation_definitions': [],
'presentation_definition': {
"id": "d76c51b7-ea90-49bb-8368-6b3d194fc131",
"input_descriptors": [
{
"id": "IdentityCredential",
"format": {
"vc+sd-jwt": {}
},
"constraints": {
"limit_disclosure": "required",
"fields": [
{
"path": [
"$.vct"
],
"filter": {
"type": "string",
"const": "IdentityCredential"
}
},
{
"path": [
"$.family_name"
]
},
{
"path": [
"$.given_name"
]
}
]
}
}
]},
'authorization_signed_response_alg': ['RS256'],
'authorization_encrypted_response_alg': ["RSA-OAEP"],
'authorization_encrypted_response_enc': ["A128CBC-HS256"],
Expand Down
138 changes: 29 additions & 109 deletions pyeudiw/tests/openid4vp/schemas/test_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,121 +152,41 @@ def test_entity_config_payload():
]
}
},
"presentation_definitions": [
{
"id": "pid-sd-jwt:unique_id+given_name+family_name",
"input_descriptors": [
{
"id": "sd-jwt",
"format": {
"jwt": {
"alg": [
"EdDSA",
"ES256"
]
"presentation_definition": {
"id": "d76c51b7-ea90-49bb-8368-6b3d194fc131",
"input_descriptors": [
{
"id": "IdentityCredential",
"format": {
"vc+sd-jwt": {}
},
"constraints": {
"limit_disclosure": "required",
"fields": [
{
"path": [
"$.vct"
],
"filter": {
"type": "string",
"const": "IdentityCredential"
}
},
"constraints": {
"limit_disclosure": "required",
"fields": [
{
"path": [
"$.sd-jwt.type"
],
"filter": {
"type": "string",
"const": "PersonIdentificationData"
}
},
{
"path": [
"$.sd-jwt.cnf"
],
"filter": {
"type": "object"
}
},
{
"path": [
"$.sd-jwt.family_name"
],
"intent_to_retain": "true"
},
{
"path": [
"$.sd-jwt.given_name"
],
"intent_to_retain": "true"
},
{
"path": [
"$.sd-jwt.unique_id"
],
"intent_to_retain": "true"
}
]
}
}
}
]
},
{
"id": "mDL-sample-req",
"input_descriptors": [
{
"id": "mDL",
"format": {
"mso_mdoc": {
"alg": [
"EdDSA",
"ES256"
{
"path": [
"$.family_name"
]
},
"constraints": {
"limit_disclosure": "required",
"fields": [
{
"path": [
"$.mdoc.doctype"
],
"filter": {
"type": "string",
"const": "org.iso.18013.5.1.mDL"
}
},
{
"path": [
"$.mdoc.namespace"
],
"filter": {
"type": "string",
"const": "org.iso.18013.5.1"
}
},
{
"path": [
"$.mdoc.family_name"
],
"intent_to_retain": "false"
},
{
"path": [
"$.mdoc.portrait"
],
"intent_to_retain": "false"
},
{
"path": [
"$.mdoc.driving_privileges"
],
"intent_to_retain": "false"
}
{
"path": [
"$.given_name"
]
}
}
]
}
]
}
],
}
]
},
"default_max_age": 1111,
"authorization_signed_response_alg": [
"RS256",
Expand Down

0 comments on commit 5908a3a

Please sign in to comment.