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

feat: SDJWT V5 (#33) #3617

Merged
merged 1 commit into from
Aug 10, 2023
Merged

Conversation

mishasizov-SK
Copy link
Contributor

@mishasizov-SK mishasizov-SK changed the title SDJWT V5 (#33) feat: SDJWT V5 (#33) Aug 9, 2023
@codecov
Copy link

codecov bot commented Aug 9, 2023

Codecov Report

Merging #3617 (ef0deab) into main (50313f0) will increase coverage by 0.04%.
The diff coverage is 91.34%.

@@            Coverage Diff             @@
##             main    #3617      +/-   ##
==========================================
+ Coverage   86.90%   86.94%   +0.04%     
==========================================
  Files         362      367       +5     
  Lines       49360    50011     +651     
==========================================
+ Hits        42895    43481     +586     
- Misses       4899     4945      +46     
- Partials     1566     1585      +19     
Files Changed Coverage Δ
component/models/sdjwt/verifier/keybidning.go 76.92% <76.92%> (ø)
component/models/sdjwt/verifier/holderbidning.go 77.77% <77.77%> (ø)
component/models/verifiable/jws.go 80.43% <80.00%> (ø)
pkg/doc/verifiable/verifiable.go 10.20% <80.00%> (+7.93%) ⬆️
component/models/sdjwt/common/verification.go 85.60% <85.60%> (ø)
component/models/verifiable/credential_jwt.go 90.00% <88.23%> (-0.11%) ⬇️
component/models/sdjwt/issuer/v5.go 90.78% <90.78%> (ø)
component/models/sdjwt/common/common.go 96.15% <91.37%> (+1.94%) ⬆️
component/models/sdjwt/issuer/v2.go 92.00% <92.00%> (ø)
component/models/sdjwt/issuer/issuer.go 92.65% <94.64%> (-0.35%) ⬇️
... and 10 more

@mishasizov-SK mishasizov-SK force-pushed the feat_sdjwt_v5 branch 6 times, most recently from 0bbf6ad to 540ee6b Compare August 9, 2023 16:02
@mishasizov-SK mishasizov-SK marked this pull request as ready for review August 9, 2023 16:19
}

// discloseClaimValue returns new value of claim, resolving dependencies on other disclosures.
func discloseClaimValue(claim interface{}, recData *recursiveData) (interface{}, error) { // nolint:funlen,gocyclo
Copy link
Contributor Author

@mishasizov-SK mishasizov-SK Aug 9, 2023

Choose a reason for hiding this comment

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

discloseClaimValue is the root function of this patch.
It responsible for:

  • resolving recursive digests in disclosures.
  • resolving digests in incoming claims.

also, it does a basic checks, e.g.

  • claim key duplications on the same nesting level
  • digests duplications
  • disclosure elements length (2 elems for array digest, 3 elems for sd digest).

Rest validation is done on the funcs that calls discloseClaimValue

Signed-off-by: Mykhailo Sizov <[email protected]>

feat: improve coverage


fix: nil


feat: more coverage
@sudeshrshetty sudeshrshetty merged commit 71e132b into hyperledger-archives:main Aug 10, 2023
12 of 14 checks passed
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.

5 participants