Skip to content
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.

feat: presentation definition can match array of presentations #3538

Merged
merged 1 commit into from
Mar 3, 2023

Conversation

Moopli
Copy link
Contributor

@Moopli Moopli commented Feb 27, 2023

Signed-off-by: Filip Burlacu filip.burlacu@securekey.com

@Moopli
Copy link
Contributor Author

Moopli commented Feb 27, 2023

TODO add tests:

  • for definition only satisfied by union of presentations
  • failure cases

@@ -76,70 +81,75 @@ func WithDisableSchemaValidation() MatchOption {
}

// Match returns the credentials matched against the InputDescriptors ids.
func (pd *PresentationDefinition) Match(vp *verifiable.Presentation, // nolint:gocyclo,funlen
contextLoader ld.DocumentLoader, options ...MatchOption) (map[string]*verifiable.Credential, error) {
func (pd *PresentationDefinition) Match(vpList []*verifiable.Presentation, // nolint:gocyclo,funlen
Copy link
Contributor

Choose a reason for hiding this comment

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

Match interface looks good to me.

@Moopli Moopli force-pushed the pd-multi-vp branch 2 times, most recently from c9838a0 to 89772e1 Compare March 3, 2023 05:05
@Moopli Moopli marked this pull request as ready for review March 3, 2023 05:15
@codecov
Copy link

codecov bot commented Mar 3, 2023

Codecov Report

Merging #3538 (3a1bfe4) into main (bd8e271) will increase coverage by 0.03%.
The diff coverage is 91.12%.

@@            Coverage Diff             @@
##             main    #3538      +/-   ##
==========================================
+ Coverage   87.72%   87.75%   +0.03%     
==========================================
  Files         351      351              
  Lines       48423    48511      +88     
==========================================
+ Hits        42481    42573      +92     
+ Misses       4402     4398       -4     
  Partials     1540     1540              
Impacted Files Coverage Δ
pkg/doc/presexch/api.go 89.75% <91.05%> (+7.76%) ⬆️
pkg/doc/cm/credentialapplication.go 92.80% <100.00%> (ø)
pkg/doc/presexch/definition.go 85.85% <0.00%> (+0.07%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Signed-off-by: Filip Burlacu <filip.burlacu@securekey.com>
@sudeshrshetty sudeshrshetty merged commit 175d658 into hyperledger-archives:main Mar 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants