forked from openwallet-foundation/acapy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add vcdm 2.0 model and context (openwallet-foundation#3436)
* add vcdm 2.0 model and context Signed-off-by: PatStLouis <patrick.st-louis@opsecid.ca> * add backwards compatibility checks: limit proof type and add issuance date with vcdm 1.1 Signed-off-by: PatStLouis <patrick.st-louis@opsecid.ca> * seperate test fixtures, lint Signed-off-by: PatStLouis <patrick.st-louis@opsecid.ca> * replace issuanceDate tests Signed-off-by: PatStLouis <patrick.st-louis@opsecid.ca> * remove askar issuanceDate sorting Signed-off-by: PatStLouis <patrick.st-louis@opsecid.ca> * rename credential context constant Signed-off-by: PatStLouis <patrick.st-louis@opsecid.ca> * linting Signed-off-by: PatStLouis <patrick.st-louis@opsecid.ca> * updated linting Signed-off-by: PatStLouis <patrick.st-louis@opsecid.ca> * remove askar sorting step Signed-off-by: PatStLouis <patrick.st-louis@opsecid.ca> * add vcdm 2.0 tests, fix presentation route default cryptosuite Signed-off-by: PatStLouis <patrick.st-louis@opsecid.ca> * Fix broken tests, add v2 context to test document loader Signed-off-by: PatStLouis <patrick.st-louis@opsecid.ca> * Lint Signed-off-by: PatStLouis <patrick.st-louis@opsecid.ca> * Debugging unit tests Signed-off-by: PatStLouis <patrick.st-louis@opsecid.ca> * rename test function to v2 Signed-off-by: PatStLouis <patrick.st-louis@opsecid.ca> * add list of support cryptosuites for vcdm 2.0 Signed-off-by: PatStLouis <patrick.st-louis@opsecid.ca> * add list of supported cryptosuites for vcdm 2.0 Signed-off-by: PatStLouis <patrick.st-louis@opsecid.ca> * fix presentation fixture Signed-off-by: PatStLouis <patrick.st-louis@opsecid.ca> * fix created format check Signed-off-by: PatStLouis <patrick.st-louis@opsecid.ca> * fix tset fixtures Signed-off-by: PatStLouis <patrick.st-louis@opsecid.ca> * lint Signed-off-by: PatStLouis <patrick.st-louis@opsecid.ca> * add authentication proof purpose Signed-off-by: PatStLouis <patrick.st-louis@opsecid.ca> * add holder proof type derivation when creating a vp Signed-off-by: PatStLouis <patrick.st-louis@opsecid.ca> * linting Signed-off-by: PatStLouis <patrick.st-louis@opsecid.ca> --------- Signed-off-by: PatStLouis <patrick.st-louis@opsecid.ca>
- Loading branch information
1 parent
e8d5fe2
commit d736a48
Showing
17 changed files
with
1,029 additions
and
93 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
68 changes: 68 additions & 0 deletions
68
acapy_agent/protocols/issue_credential/v2_0/formats/ld_proof/tests/fixtures.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 |
---|---|---|
@@ -0,0 +1,68 @@ | ||
TEST_DID_SOV = "did:sov:LjgpST2rjsoxYegQDRm7EL" | ||
TEST_DID_KEY = "did:key:z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL" | ||
|
||
LD_PROOF_VC_DETAIL = { | ||
"credential": { | ||
"@context": [ | ||
"https://www.w3.org/2018/credentials/v1", | ||
"https://www.w3.org/2018/credentials/examples/v1", | ||
], | ||
"type": ["VerifiableCredential", "UniversityDegreeCredential"], | ||
"credentialSubject": {"test": "key"}, | ||
"issuanceDate": "2021-04-12", | ||
"issuer": TEST_DID_KEY, | ||
}, | ||
"options": { | ||
"proofType": "Ed25519Signature2018", | ||
"created": "2019-12-11T03:50:55", | ||
}, | ||
} | ||
LD_PROOF_VC_DETAIL_BBS = { | ||
"credential": { | ||
"@context": [ | ||
"https://www.w3.org/2018/credentials/v1", | ||
"https://www.w3.org/2018/credentials/examples/v1", | ||
], | ||
"type": ["VerifiableCredential", "UniversityDegreeCredential"], | ||
"credentialSubject": {"test": "key"}, | ||
"issuanceDate": "2021-04-12", | ||
"issuer": TEST_DID_KEY, | ||
}, | ||
"options": { | ||
"proofType": "BbsBlsSignature2020", | ||
"created": "2019-12-11T03:50:55", | ||
}, | ||
} | ||
LD_PROOF_VC_DETAIL_ED25519_2020 = { | ||
"credential": { | ||
"@context": [ | ||
"https://www.w3.org/2018/credentials/v1", | ||
"https://www.w3.org/2018/credentials/examples/v1", | ||
], | ||
"type": ["VerifiableCredential", "UniversityDegreeCredential"], | ||
"credentialSubject": {"test": "key"}, | ||
"issuanceDate": "2021-04-12", | ||
"issuer": TEST_DID_KEY, | ||
}, | ||
"options": { | ||
"proofType": "Ed25519Signature2020", | ||
"created": "2019-12-11T03:50:55", | ||
}, | ||
} | ||
LD_PROOF_VC = { | ||
"@context": [ | ||
"https://www.w3.org/2018/credentials/v1", | ||
"https://www.w3.org/2018/credentials/examples/v1", | ||
], | ||
"type": ["VerifiableCredential", "UniversityDegreeCredential"], | ||
"credentialSubject": {"test": "key"}, | ||
"issuanceDate": "2021-04-12", | ||
"issuer": TEST_DID_KEY, | ||
"proof": { | ||
"proofPurpose": "assertionMethod", | ||
"created": "2019-12-11T03:50:55", | ||
"type": "Ed25519Signature2018", | ||
"verificationMethod": "did:key:z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL#z6Mkgg342Ycpuk263R9d8Aq6MUaxPn1DDeHyGo38EefXmgDL", | ||
"jws": "eyJhbGciOiAiRWREU0EiLCAiYjY0IjogZmFsc2UsICJjcml0IjogWyJiNjQiXX0..Q6amIrxGiSbM7Ce6DxlfwLCjVcYyclas8fMxaecspXFUcFW9DAAxKzgHx93FWktnlZjM_biitkMgZdStgvivAQ", | ||
}, | ||
} |
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
Oops, something went wrong.