-
Notifications
You must be signed in to change notification settings - Fork 160
test/support ability in AFGO to create and parse vc and vp in JWT format #3334
test/support ability in AFGO to create and parse vc and vp in JWT format #3334
Conversation
Verifier: getVerifier(resolver, VerifyRS256), | ||
}, | ||
) | ||
verifiers := []verifier.SignatureVerifier{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extended the list of default verifiers.
|
||
type docLoaderProvider struct { | ||
ContextStore ldstore.ContextStore | ||
RemoteProviderStore ldstore.RemoteProviderStore | ||
} | ||
|
||
func (p *docLoaderProvider) JSONLDContextStore() ldstore.ContextStore { | ||
return p.ContextStore | ||
} | ||
|
||
func (p *docLoaderProvider) JSONLDRemoteProviderStore() ldstore.RemoteProviderStore { | ||
return p.RemoteProviderStore | ||
} | ||
|
||
func createDocumentLoader() (*ld.DocumentLoader, error) { | ||
contextStore, err := ldstore.NewContextStore(mem.NewProvider()) | ||
if err != nil { | ||
return nil, err | ||
} | ||
|
||
remoteProviderStore, err := ldstore.NewRemoteProviderStore(mem.NewProvider()) | ||
if err != nil { | ||
return nil, err | ||
} | ||
|
||
p := &docLoaderProvider{ | ||
ContextStore: contextStore, | ||
RemoteProviderStore: remoteProviderStore, | ||
} | ||
|
||
loader, err := ld.NewDocumentLoader(p, ld.WithExtraContexts(bddldcontext.Extra()...)) | ||
if err != nil { | ||
return nil, err | ||
} | ||
|
||
return loader, nil | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reused the code from github.com/hyperledger/aries-framework-go/test/bdd/pkg/verifiable
Codecov Report
@@ Coverage Diff @@
## main #3334 +/- ##
=======================================
Coverage 88.01% 88.01%
=======================================
Files 323 323
Lines 44437 44445 +8
=======================================
+ Hits 39110 39118 +8
Misses 3929 3929
Partials 1398 1398
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
test/bdd/features/jwt.feature
Outdated
Feature: Issue and verify Verifiable Credential and Verifiable Presentation with JWS proof | ||
@issue_vc_vp_jwt_ed25519 | ||
Scenario: Issue VC - verify VC - create VP - verify VP with Ed25519 JWS proof | ||
When "Berkley" issues VC at "2022-04-12" regarding "Master Degree" to "Alice" with "Ed25519" JWS proof |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change from JWS proof to JWS format
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed, pls see
test/bdd/features/jwt.feature
Outdated
Then "Alice" embeds the VC into VP with "Ed25519" JWS proof | ||
Then "Alice" verifies VP | ||
|
||
@issue_vc_vp_jwt_ecdsaSecp256r1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to duplicate steps you can use something like this https://github.com/hyperledger/aries-framework-go/blob/main/test/bdd/features/didexchange_public_did.feature#L67
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great catch! updated
Signed-off-by: Mykhailo Sizov <mykhailo.sizov@securekey.com>
7f60a99
to
046adf0
Compare
Signed-off-by: Mykhailo Sizov mykhailo.sizov@securekey.com
Title:
Support ability in AFGO to create and parse vc and vp in JWT format
Description:
Added BDD tests with creating and verifying VC and VP in JWT format.
Solves: #3314
Summary:
Algorithms included: