-
Notifications
You must be signed in to change notification settings - Fork 53
Add appendix with issuance, verification, and presentation examples #684
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
eric-schuh
wants to merge
2
commits into
w3c:main
Choose a base branch
from
eric-schuh:add_swimlane_examples
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -4479,6 +4479,182 @@ <h3>Complex Examples</h3> | |||||
| </section> | ||||||
| </section> | ||||||
|
|
||||||
| <section class="appendix"> | ||||||
| <h2>Swimlane Examples for Issuance, Verification, and Presentation</h2> | ||||||
|
|
||||||
| <h3>Issuance of a VC to a requesting holder</h3> | ||||||
| <p> | ||||||
| The following example details a [=holder=] requesting the issuance of a | ||||||
| [=verifiable credential=] from an [=issuer=]. | ||||||
| </p> | ||||||
|
|
||||||
| <figure> | ||||||
| <pre class="mermaid" style="max-width:100%"> | ||||||
| sequenceDiagram | ||||||
| participant H as Holder | ||||||
| participant HC as Holder Coordinator | ||||||
| participant HS as Holder Service | ||||||
| participant IWF as Issuer Workflow Service | ||||||
| participant IC as Issuer Coordinator | ||||||
| participant IS as Issuer Service | ||||||
|
|
||||||
| Note over H,IS: Prerequisite: Exchange created by Issuer Coordinator | ||||||
|
|
||||||
| H->>HC: Request credential | ||||||
| HC->>IWF: POST /workflows/123/exchanges/abc ({}) | ||||||
|
|
||||||
| Note left of IWF: Initiate exchange by POSTing an empty JSON object. | ||||||
|
|
||||||
| IWF->>IC: Coordinate | ||||||
| IC->>IC: Apply buisiness rules | ||||||
| IC->>IWF: Return VPR (auth request) | ||||||
| IWF->>HC: Verifiable Presentation Request | ||||||
|
|
||||||
| HC->>H: (optional) Show consent prompt | ||||||
| H->>HC: Approve | ||||||
|
|
||||||
| HC->>HC: Create VP with auth | ||||||
| HC->>IWF: POST /workflows/123/exchanges/abc ({verifiablePresentation}) | ||||||
| IWF->>IC: Validate VP | ||||||
|
|
||||||
| IC->>IS: POST /credentials/issue | ||||||
| IS->>IC: Verifiable Credential | ||||||
|
|
||||||
| IC->>IWF: Return VC | ||||||
| IWF->>HC: {verifiablePresentation: [VC]} | ||||||
| HC->>HS: Store VC | ||||||
| HS->>HC: Storage success | ||||||
| HC->>H: Display success | ||||||
| </pre> | ||||||
| <figcaption> | ||||||
| Issuance of a credential to the requesting holder. | ||||||
| </figcaption> | ||||||
| </figure> | ||||||
|
|
||||||
| <h3>Verification of a single VC</h3> | ||||||
| <p> | ||||||
| The following diagram details verification of a single [=verifiable credential=] | ||||||
| upon request by a [=holder=]. `GET /credentials/{id}` is used, with the [=holder | ||||||
| coordinator=] doing the work of generating the [=verifiable presentation=] that | ||||||
| is then sent to the [=verifier=]. In contrast to the preceding issuance example, | ||||||
| the verifier does not make any auth request in this [=workflow=]. If the | ||||||
| [=verifier=] wanted, they could do another back-and-forth with the [=holder=] | ||||||
| before deciding to verify the provided [=verifiable presentation=]. | ||||||
| </p> | ||||||
| <figure> | ||||||
| <pre class="mermaid" style="max-width:100%"> | ||||||
| sequenceDiagram | ||||||
| participant H as Holder | ||||||
| participant HC as Holder Coordinator | ||||||
| participant HS as Holder Service | ||||||
| participant VWF as Verifier Workflow Service | ||||||
| participant VC as Verifier Coordinator | ||||||
| participant VS as Verifier Service | ||||||
|
|
||||||
| Note over H,VS: Prerequisite: Exchange created by Verifier Coordinator | ||||||
|
|
||||||
| H->>HC: Request verification of VC-098 | ||||||
| HC->>HS: GET /credentials/{id} (id:VC-098) | ||||||
| HS->>HC: Requested VC-098 | ||||||
| HC->>HC: Create VP with auth and selected VC-098 to verify | ||||||
| HC->>VWF: POST /workflows/456/exchanges/ghi ({createdVP}) | ||||||
|
|
||||||
| Note left of VWF: Initiate exchange including the created VP. | ||||||
|
|
||||||
| VWF->>VC: Validate VP | ||||||
| VC->>VC: Apply buisiness rules | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| VC->>VC: Extract contained VC-098 from VP | ||||||
| VC->>VS: POST /credentials/verify ({extractedVC-098}) | ||||||
|
|
||||||
| VS->>VC: Verification Result | ||||||
| VC->>VWF: Verification result | ||||||
| VWF->>HC: Verification result | ||||||
| HC->>H: Display verification result | ||||||
| </pre> | ||||||
| <figcaption> | ||||||
| Verification of a single credential. | ||||||
| </figcaption> | ||||||
| </figure> | ||||||
|
|
||||||
| <h3>Verification of a multiple VCs</h3> | ||||||
| <p> | ||||||
| The following diagram details the verification of multiple [=verifiable credential=] | ||||||
| at the request of a [=holder=]. It shows the use of the POST /presentations to create the | ||||||
| [=verifiable presentation=], with the [=holder service=] doing the work of generating | ||||||
| the [=verifiable presentation=] that is sent to the [=verifier=]. The [=workflow=] | ||||||
| shown here does not have the verifier doing any auth request as seen in the issuance example | ||||||
| above. If the [=verifier=] wanted they could do another back and forth with the [=holder=] | ||||||
| before deciding to verify the provided [=verifiable presentation=]. | ||||||
| </p> | ||||||
| <figure> | ||||||
| <pre class="mermaid" style="max-width:100%"> | ||||||
| sequenceDiagram | ||||||
| participant H as Holder | ||||||
| participant HC as Holder Coordinator | ||||||
| participant HS as Holder Service | ||||||
| participant VWF as Verifier Workflow Service | ||||||
| participant VC as Verifier Coordinator | ||||||
| participant VS as Verifier Service | ||||||
|
|
||||||
| Note over H,VS: Prerequisite: Exchange created by Verifier Coordinator | ||||||
|
|
||||||
| H->>HC: Request verification of a set of VCs | ||||||
| HC->>HS: POST /presentations ({setofVCs}) | ||||||
| HS->>HS: Create VP with specified VCs | ||||||
| HS->>HC: Requested VP | ||||||
| HC->>VWF: POST /workflows/456/exchanges/ghi ({verifiablePresentation}) | ||||||
|
|
||||||
| Note left of VWF: Initiate exchange including the requested VP. | ||||||
|
|
||||||
| VWF->>VC: Validate VP | ||||||
| VC->>VC: Apply buisiness rules | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| VC->>VS: POST /presentations/verify ({verifiablePresentation}) | ||||||
|
|
||||||
| VS->>VC: Verification Result | ||||||
| VC->>VWF: Verification result | ||||||
| VWF->>HC: Verification result | ||||||
| HC->>H: Display verification result | ||||||
| </pre> | ||||||
| <figcaption> | ||||||
| Verification of multiple credentials in one presentation. | ||||||
| </figcaption> | ||||||
| </figure> | ||||||
|
|
||||||
| <h3>Presentation of a VC in person</h3> | ||||||
| <p> | ||||||
| The following diagram details the presentation of a [=verifiable credential=] at the | ||||||
| request of a [=holder=] to another person, Alice, who might be a [=verifier=] or | ||||||
| another [=holder=]. The presenting [=holder=] uses `GET /presentations/{id}`, | ||||||
| which implies that this [=holder=] has presented this same credential in the past, and the [=holder coordinator=] knows the id to request the existing presentation. | ||||||
| </p> | ||||||
| <figure> | ||||||
| <pre class="mermaid" style="max-width:100%"> | ||||||
| sequenceDiagram | ||||||
| participant H as Holder | ||||||
| participant HC as Holder Coordinator | ||||||
| participant HS as Holder Service | ||||||
| participant A as Alice | ||||||
| participant AHC as Alice's Holder Coordinator | ||||||
|
|
||||||
| H->>HC: Select VC to present | ||||||
| HC->>HS: GET /presentations/{id} (id:presentationId) | ||||||
| HS->>HS: Generate VP with selected VC | ||||||
| HS->>HC: Generated VP | ||||||
|
|
||||||
| HC->>HC: Encode VP as QR Code | ||||||
| HC->>H: Display QR Code | ||||||
|
|
||||||
| H->>A: Show displayed QR Code | ||||||
| A->>AHC: Start camera | ||||||
| AHC->>HC: Scan presented QR Code | ||||||
| </pre> | ||||||
| <figcaption> | ||||||
| Presentation of a VC in person | ||||||
| </figcaption> | ||||||
| </figure> | ||||||
|
|
||||||
| </section> | ||||||
|
|
||||||
| <section class="appendix"> | ||||||
| <h2>Relationship to Other Specifications</h2> | ||||||
|
|
||||||
|
|
||||||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.