Skip to content
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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Alice/Faber demo to include json-ld credentials and proofs #1235

Merged
merged 18 commits into from
Jun 23, 2021

Conversation

ianco
Copy link
Contributor

@ianco ianco commented Jun 9, 2021

Still work in progress - working on updates to the documentation, and adding BDD tests. Logic in the demo is pretty straightforward and will be enhanced.

The holder credentialSubject.id (in the credential) must be specified in order for the presentation to validate. I have added this as an optional parameter to the /create-request endpoint, if the holder supplied a did then it will be inserted into the credential request as the credentialSubject.id. (Not sure if this is the best approach @TimoGlastra @andrewwhitehead @swcurran )

ianco added 3 commits June 9, 2021 10:43
Signed-off-by: Ian Costanzo <[email protected]>
Signed-off-by: Ian Costanzo <[email protected]>
@codecov-commenter
Copy link

codecov-commenter commented Jun 9, 2021

Codecov Report

Merging #1235 (e76e137) into main (05805c0) will decrease coverage by 0.01%.
The diff coverage is 80.00%.

@@            Coverage Diff             @@
##             main    #1235      +/-   ##
==========================================
- Coverage   98.21%   98.20%   -0.02%     
==========================================
  Files         466      466              
  Lines       26840    26853      +13     
==========================================
+ Hits        26362    26372      +10     
- Misses        478      481       +3     

@ianco ianco marked this pull request as ready for review June 15, 2021 03:28
@ianco ianco requested a review from andrewwhitehead June 18, 2021 19:46
# Add BBS context if not present yet
if (
detail.options.proof_type == BbsBlsSignature2020.signature_type
and SECURITY_CONTEXT_BBS_URL not in detail.credential.context_urls
):
detail.credential.add_context(SECURITY_CONTEXT_BBS_URL)

# add holder_did as credentialSubject.id (if provided)
if holder_did and holder_did.startswith("did:key"):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why this would be limited to did:key, shouldn't any DID be treated the same here?

@andrewwhitehead andrewwhitehead merged commit 2dc24b1 into openwallet-foundation:main Jun 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants