Skip to content

Request for personal data

Markus Sabadello edited this page Nov 16, 2016 · 1 revision

The webshop requests Maria's name and address using the following XDI message in JXD format:

[
  {
    "@id": "+!:did:sov:1yvXbmgPoUm4dl66D7KhyD[$msg]@~0",
    "do": {
      "get": [
        "{$to}$card#address"
      ]
    },
    "contract": [
      "({$to}/$get)$contract"
    ],
    "to": [
      "{($to)}"
    ]
  }
]

Some explanations:

  • +!:did:sov:1yvXbmgPoUm4dl66D7KhyD is the Webshop, i.e. the sender of the request.
  • {$to}$card#address is the personal data that is being request, it is an "address" on a "card". These are common structures in XDI graphs.
  • The contract is a reference to the link contract for sending this request for personal data. It is a standard link contract that requires Maria to manually approve the request.
  • The to is the target of the request to store the ticket. This uses a variable, since Maria's identifier is not known at the time this request is created.
Clone this wiki locally