decentralized-identity/credential-manifest

Split apart the "display" property

Closed this issue · 1 comments

So currently the "display" property is used before and after the holder has a credential. I think this should be split apart to two separate properties, for before and after the holder recieves a credential.

{
  "output_descriptors": [
    {
      // ...
      "offer_display": {
        "title": {
          "text": "Washington State Driver License"
        },
        "subtitle": {
          "text": "Class A, Commercial"
        },
        "description": {
          "text": "License to operate a vehicle with a gross combined weight rating (GCWR) of 26,001 or more pounds, as long as the GVWR of the vehicle(s) being towed is over 10,000 pounds."
        },
        "properties": [
          {
            "label": "Organ Donor",
            "text": "True/False"
          }
        ]
      },
      "display": {
        "title": {
          "path": ["$.name", "$.vc.name"],
        },
        "subtitle": {
          "path": ["$.class", "$.vc.class"],
        },
        "properties": [
          {
            "path": ["$.donor", "$.vc.donor"],
            "label": "Organ Donor"
          }
        ]
      }
    }
  ]
}

This "offer_display" (I don't like this name, open to others!) would be used to show the holder info about the credential before they submit the "presentation_submission" and would hold static "text" fields. And then the "display" property is strictly drived from the credential (using "path" to find the field to display from the credential).


There was also some talk on whether the current "display" object should be embedded into the issued credential. If we want to do that then I'd suggest keeping "offer_display" (just "text" and "label" + "text") on the Output Descriptor but keep the name "display".

{
  "output_descriptors": [
    {
      // ...
      "display": {
        "title": {
          "text": "Washington State Driver License"
        },
        "subtitle": {
          "text": "Class A, Commercial"
        },
        "description": {
          "text": "License to operate a vehicle with a gross combined weight rating (GCWR) of 26,001 or more pounds, as long as the GVWR of the vehicle(s) being towed is over 10,000 pounds."
        },
        "properties": [
          {
            "label": "Organ Donor",
            "text": "True/False"
          }
        ]
      },
    }
  ]
}
{
  "type": ["VerifiableCredential", "..."],
  "display": {
    "title": {
      "path": ["$.name", "$.vc.name"],
    },
    "subtitle": {
      "path": ["$.class", "$.vc.class"],
    },
    "properties": [
      {
        "path": ["$.donor", "$.vc.donor"],
        "label": "Organ Donor"
      }
    ]
  }
  // ...
}

Explained better in #44