Skip to content

Commit

Permalink
Add PID example (#214)
Browse files Browse the repository at this point in the history
* Add PID example

* Of course I forgot to add the new files

* Apply suggestions from Brian's review

Co-authored-by: Brian Campbell <[email protected]>

* Disclose only nationality

* Add changelog entry

* Fix yaml specification

* Adapt text

* Fix the description of the example

* Input claim(s)

---------

Co-authored-by: Daniel Fett <[email protected]>
Co-authored-by: Brian Campbell <[email protected]>
  • Loading branch information
3 people committed Feb 27, 2024
1 parent e4e3b69 commit 5b93e96
Show file tree
Hide file tree
Showing 2 changed files with 93 additions and 0 deletions.
53 changes: 53 additions & 0 deletions draft-ietf-oauth-sd-jwt-vc.md
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,13 @@ format encoded as CBOR and secured using COSE.
</author>
</front>
</reference>

<reference anchor="EUDIW.ARF" target="https://github.com/eu-digital-identity-wallet/eudi-doc-architecture-and-reference-framework/releases">
<front>
<author fullname="European Commission"></author>
<title>The European Digital Identity Wallet Architecture and Reference Framework</title>
</front>
</reference>
{backmatter}

# IANA Considerations
Expand Down Expand Up @@ -714,6 +721,51 @@ by [@!RFC5785].
* Specification document: [[ (#jwt-vc-issuer-metadata) of this of this specification ]]
* Related information: (none)

# Examples

Important: The following examples are not normative and provided for
illustrative purposes only. In particular, neither the structure of the claims
nor the selection of selectively disclosable claims are normative.

Line breaks have been added for readability.

## Example 1: Person Identification Data (PID) Credential

This example shows how the artifacts defined in this specification could
be used to represent the concept of a Person Identification Data (PID)
[@EUDIW.ARF] using the data of a German citizen.

Key Binding is applied
using the Holder's public key passed in a `cnf` claim in the SD-JWT.

The Issuer is using the following input claims set:

<{{examples/03-pid/user_claims.json}}

The following is the issued SD-JWT:

<{{examples/03-pid/sd_jwt_issuance.txt}}

The following payload is used for the SD-JWT:

<{{examples/03-pid/sd_jwt_payload.json}}

The following Disclosures are created by the Issuer:

{{examples/03-pid/disclosures.md}}

The following shows a presentation of the SD-JWT with a Key Binding JWT that discloses only the nationality of the Holder:

<{{examples/03-pid/sd_jwt_presentation.txt}}

The following is the payload of a corresponding Key Binding JWT:

<{{examples/03-pid/kb_jwt_payload.json}}

After the validation, the Verifier will have the following data for further processing:

<{{examples/03-pid/verified_contents.json}}

# Acknowledgements {#Acknowledgements}

We would like to thank
Expand Down Expand Up @@ -745,6 +797,7 @@ for their contributions (some of which substantial) to this draft and to the ini
* Fix some formatting and text in the media type and JWT claim registration requests
* Clarify the optionality of the `cnf` claim
* Added relationships to other documents
* Added PID example

-01

Expand Down
40 changes: 40 additions & 0 deletions examples/03-pid/specification.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
user_claims:
vct: https://bmi.bund.example/credential/pid/1.0
# vct#integrity: sha256-jo8433ot48utul8ura33
!sd given_name: Erika
!sd family_name: Mustermann
!sd birthdate: '1963-08-12'
!sd source_document_type: id_card
!sd address:
!sd street_address: Heidestraße 17
!sd locality: Köln
!sd postal_code: '51147'
!sd country: DE
!sd nationalities:
- DE
!sd gender: female
!sd birth_family_name: Gabler
!sd place_of_birth:
!sd locality: Berlin
country: DE
!sd also_known_as: Schwester Agnes
age_equal_or_over:
!sd '12': true
!sd '14': true
!sd '16': true
!sd '18': true
!sd '21': true
!sd '65': false


holder_disclosed_claims:
nationalities:
- true
#age_equal_or_over:
# '18': true

add_decoy_claims: false
key_binding: true

extra_header_parameters:
typ: "vc+sd-jwt"

0 comments on commit 5b93e96

Please sign in to comment.