diff --git a/pyeudiw/tests/federation/schemas/test_entity_configuration.py b/pyeudiw/tests/federation/schemas/test_entity_configuration.py index 5592d26d..22788490 100644 --- a/pyeudiw/tests/federation/schemas/test_entity_configuration.py +++ b/pyeudiw/tests/federation/schemas/test_entity_configuration.py @@ -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, diff --git a/pyeudiw/tests/federation/test_schema.py b/pyeudiw/tests/federation/test_schema.py index 7c5d2d2f..37559f76 100644 --- a/pyeudiw/tests/federation/test_schema.py +++ b/pyeudiw/tests/federation/test_schema.py @@ -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"], diff --git a/pyeudiw/tests/openid4vp/schemas/test_schema.py b/pyeudiw/tests/openid4vp/schemas/test_schema.py index 6496811e..6f63e067 100644 --- a/pyeudiw/tests/openid4vp/schemas/test_schema.py +++ b/pyeudiw/tests/openid4vp/schemas/test_schema.py @@ -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",