-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #560 from bcgov/present_proof_2
Use present-proof v2 protocol
- Loading branch information
Showing
14 changed files
with
1,448 additions
and
273 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
19 changes: 2 additions & 17 deletions
19
oidc-controller/api/core/aries/present_proof_attachment.py
This file contains 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 |
---|---|---|
@@ -1,24 +1,9 @@ | ||
import json | ||
import base64 | ||
|
||
from typing import Dict | ||
from pydantic import BaseModel, Field | ||
|
||
|
||
class PresentProofv10Attachment(BaseModel): | ||
# https://github.com/hyperledger/aries-rfcs/blob/main/features/0037-present-proof/README.md#request-presentation | ||
class PresentProofv20Attachment(BaseModel): | ||
# https://github.com/hyperledger/aries-rfcs/tree/eace815c3e8598d4a8dd7881d8c731fdb2bcc0aa/features/0454-present-proof-v2 | ||
id: str = Field(default="libindy-request-presentation-0", alias="@id") | ||
mime_type: str = Field(default="application/json", alias="mime-type") | ||
data: Dict | ||
|
||
@classmethod | ||
def build( | ||
cls, presentation_request | ||
) -> "PresentProofv10Attachment": # bundle everything needed for the QR code | ||
return cls( | ||
data={ | ||
"base64": base64.b64encode( | ||
json.dumps(presentation_request).encode("ascii") | ||
).decode("ascii") | ||
} | ||
) |
This file contains 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
This file contains 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
Oops, something went wrong.