This repository has been archived by the owner on Mar 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support for JSON-LD in universal wallet implementation (#3346)
Signed-off-by: Mykhailo Sizov <[email protected]> Signed-off-by: Mykhailo Sizov <[email protected]>
- Loading branch information
1 parent
6c0c224
commit a66828f
Showing
14 changed files
with
920 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# | ||
# Copyright SecureKey Technologies Inc. All Rights Reserved. | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
|
||
@wallet_jsonld | ||
Feature: Support for JSON-LD in universal wallet | ||
|
||
Scenario Outline: Issue credentials, add to wallet, query presentation, verify presentation and credentials | ||
Given credentials crypto algorithm "<crypto>" | ||
And "Berkley" agent is running on "localhost" port "random" with http-binding did resolver url "${SIDETREE_URL}" which accepts did method "sidetree" | ||
And "Alice" agent is running on "localhost" port "random" with http-binding did resolver url "${SIDETREE_URL}" which accepts did method "sidetree" | ||
When "Alice" creates wallet profile | ||
And "Alice" opens wallet | ||
And "Berkley" issues credentials at "2022-04-12" regarding "Master Degree" to "Alice" | ||
Then "Alice" adds credentials to the wallet issued by "Berkley" | ||
When "Vanna" queries credentials issued by "Berkley" using "QueryByExample" query type | ||
Then "Alice" resolves query | ||
And "Alice" adds presentations proof | ||
And "Alice" closes wallet | ||
Then "Vanna" receives presentations signed by "Alice" and verifies it | ||
And "Vanna" receives credentials from presentation signed by "Berkley" and verifies it | ||
Examples: | ||
| crypto | | ||
| "Ed25519" | | ||
| "ECDSA Secp256r1" | | ||
| "ECDSA Secp384r1" | | ||
|
||
Scenario Outline: Issue credentials using the wallet, add to wallet, query presentation, verify presentation and credentials | ||
Given credentials crypto algorithm "<crypto>" | ||
And "Alice" agent is running on "localhost" port "random" with http-binding did resolver url "${SIDETREE_URL}" which accepts did method "sidetree" | ||
When "Alice" creates wallet profile | ||
And "Alice" opens wallet | ||
And "Alice" creates credentials at "2022-04-12" regarding "Master Degree" without proof | ||
And "Alice" issues credentials using the wallet | ||
Then "Alice" adds credentials to the wallet issued by "Alice" | ||
When "Vanna" queries credentials issued by "Alice" using "PresentationExchange" query type | ||
And "Alice" resolves query | ||
And "Alice" adds presentations proof | ||
And "Alice" closes wallet | ||
Then "Vanna" receives presentations signed by "Alice" and verifies it | ||
And "Vanna" receives credentials from presentation signed by "Alice" and verifies it | ||
Examples: | ||
| crypto | | ||
| "Ed25519" | | ||
| "ECDSA Secp256r1" | | ||
| "ECDSA Secp384r1" | | ||
|
||
Scenario Outline: Issue multiple credentials, add to wallet, query all, verify credentials | ||
Given credentials crypto algorithm "<crypto>" | ||
And "Berkley" agent is running on "localhost" port "random" with http-binding did resolver url "${SIDETREE_URL}" which accepts did method "sidetree" | ||
And "MIT" agent is running on "localhost" port "random" with http-binding did resolver url "${SIDETREE_URL}" which accepts did method "sidetree" | ||
And "Alice" agent is running on "localhost" port "random" with http-binding did resolver url "${SIDETREE_URL}" which accepts did method "sidetree" | ||
When "Alice" creates wallet profile | ||
And "Alice" opens wallet | ||
And "Berkley" issues credentials at "2022-04-12" regarding "Master Degree" to "Alice" | ||
And "MIT" issues credentials at "2022-04-12" regarding "Bachelor Degree" to "Alice" | ||
Then "Alice" adds credentials to the wallet issued by "Berkley" | ||
And "Alice" adds credentials to the wallet issued by "MIT" | ||
When "Vanna" queries all credentials from "Alice" | ||
Then "Vanna" receives "2" credentials | ||
And "Alice" closes wallet | ||
And "Vanna" verifies credentials issued by "Berkley" | ||
And "Vanna" verifies credentials issued by "MIT" | ||
Examples: | ||
| crypto | | ||
| "Ed25519" | | ||
| "ECDSA Secp256r1" | | ||
| "ECDSA Secp384r1" | |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
Copyright SecureKey Technologies Inc. All Rights Reserved. | ||
SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package walletjsonld | ||
|
||
import ( | ||
bddagent "github.com/hyperledger/aries-framework-go/test/bdd/agent" | ||
) | ||
|
||
func (s *SDKSteps) createAgent(agent, inboundHost, inboundPort, endpointURL, acceptDidMethod string) error { | ||
agentSDK := bddagent.NewSDKSteps() | ||
agentSDK.SetContext(s.bddContext) | ||
|
||
return agentSDK.CreateAgentWithHTTPDIDResolver( | ||
agent, | ||
inboundHost, | ||
inboundPort, | ||
endpointURL, | ||
acceptDidMethod, | ||
) | ||
} |
Oops, something went wrong.