italia / eudi-wallet-it-python

Python toolchain for building an OpenID4VP RP with a SATOSA backend compliant with the Italian Wallet implementation profile
Apache License 2.0
16 stars 9 forks source link

[OpenID4VP] checks on vp_format #145

Closed peppelinux closed 7 months ago

peppelinux commented 8 months ago

https://openid.github.io/OpenID4VP/openid-4-verifiable-presentations-wg-draft.html#section-5.1-8

The Verifiable Credential and Verifiable Presentation formats supported by the Wallet should be published in its metadata using the metadata parameter vp_formats_supported (see Section 8).

The formats supported by a Verifier may be set up using the metadata parameter vp_formats (see Section 9.1). The Wallet MUST ignore any format property inside a presentation_definition object if that format was not included in the vp_formats property of the metadata.

Note: When a Verifier is requesting the presentation of a Verifiable Presentation containing a Verifiable Credential, the Verifier MUST indicate in the vp_formats parameter the supported formats of both Verifiable Credential and Verifiable Presentation.

peppelinux commented 7 months ago

@salvatorelaiso please resolve this issue with a PR that only considers the HAIP profile defined here https://openid.github.io/oid4vc-haip-sd-jwt-vc/draft-oid4vc-haip-sd-jwt-vc.html#section-7.2.7

peppelinux commented 7 months ago

Please update this https://github.com/italia/eudi-wallet-it-python/blob/dev/pyeudiw/openid4vp/schemas/__init__.py

please move __init__.py contents in separate files by scope, eg: vp_formats.py