Skip to content

Commit

Permalink
Merge pull request #1303 from shaangill025/demo
Browse files Browse the repository at this point in the history
DIF PE Integration Test Update - required before PR#1294 merge
  • Loading branch information
andrewwhitehead authored Jul 8, 2021
2 parents acf4e70 + ef3edc6 commit 102bd85
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 1 deletion.
24 changes: 23 additions & 1 deletion demo/AliceWantsAJsonCredential.md
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,17 @@ To request a proof, submit the following (with appropriate `connection_id`) to F
],
"constraints": {
"limit_disclosure": "required",
"is_holder": [
{
"directive": "required",
"field_id": [
"1f44d55f-f161-4938-a659-f8026467f126"
],
}
],
"fields": [
{
"id": "1f44d55f-f161-4938-a659-f8026467f126",
"path": [
"$.credentialSubject.familyName"
],
Expand All @@ -389,7 +398,9 @@ To request a proof, submit the following (with appropriate `connection_id`) to F
}
```

There are several ways that Alice can prespond with a presentation. The simplest will just tell aca-py to put the presentation together and send it to Faber - submit the following to Alice's `/request-presentation-2.0/{pres_ex_id}/send-presentation`:
Note that the `is_holder` property can be used by Faber to verify that the holder of credential is the same as the subject of the attribute (`familyName`). Later on, the received presentation will be signed and verifiable only if `is_holder` with ` "directive": "required"` is included in the presentation request.

There are several ways that Alice can respond with a presentation. The simplest will just tell aca-py to put the presentation together and send it to Faber - submit the following to Alice's `/request-presentation-2.0/{pres_ex_id}/send-presentation`:

```
{
Expand Down Expand Up @@ -429,8 +440,18 @@ Firstly, Alice can include the received presentation request in the body to the
],
"constraints": {
"limit_disclosure": "required",
"is_holder": [
{
"directive": "required",
"field_id": [
"1f44d55f-f161-4938-a659-f8026467f126",
"332be361-823a-4863-b18b-c3b930c5623e"
],
}
],
"fields": [
{
"id": "1f44d55f-f161-4938-a659-f8026467f126",
"path": [
"$.credentialSubject.familyName"
],
Expand All @@ -440,6 +461,7 @@ Firstly, Alice can include the received presentation request in the body to the
}
},
{
"id": "332be361-823a-4863-b18b-c3b930c5623e",
"path": [
"$.id"
],
Expand Down
9 changes: 9 additions & 0 deletions demo/features/steps/0454-present-proof.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,17 @@ def step_impl(context, verifier, request_for_proof, prover):
],
"constraints": {
"limit_disclosure": "required",
"is_holder": [
{
"directive": "required",
"field_id": [
"1f44d55f-f161-4938-a659-f8026467f126"
],
}
],
"fields": [
{
"id": "1f44d55f-f161-4938-a659-f8026467f126",
"path": ["$.credentialSubject.familyName"],
"purpose": "The claim must be from one of the specified person",
"filter": {"const": "SMITH"},
Expand Down
9 changes: 9 additions & 0 deletions demo/runners/faber.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,8 +440,17 @@ async def main(args):
],
"constraints": {
"limit_disclosure": "required",
"is_holder": [
{
"directive": "required",
"field_id": [
"1f44d55f-f161-4938-a659-f8026467f126"
],
}
],
"fields": [
{
"id": "1f44d55f-f161-4938-a659-f8026467f126",
"path": [
"$.credentialSubject.familyName"
],
Expand Down

0 comments on commit 102bd85

Please sign in to comment.