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

feat: Unit test for SD-JWT Flow (Issuer, Holder, Verifier) #3462

Merged
merged 1 commit into from
Jan 5, 2023

Conversation

sandrask
Copy link
Contributor

@sandrask sandrask commented Jan 5, 2023

Unit test for SD-JWT Flow.

Closes #3461

Signed-off-by: Sandra Vrtikapa [email protected]

@codecov
Copy link

codecov bot commented Jan 5, 2023

Codecov Report

Merging #3462 (f7617dd) into main (aae6bb8) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #3462   +/-   ##
=======================================
  Coverage   87.64%   87.64%           
=======================================
  Files         350      350           
  Lines       47436    47450   +14     
=======================================
+ Hits        41573    41586   +13     
- Misses       4350     4351    +1     
  Partials     1513     1513           
Impacted Files Coverage Δ
pkg/doc/sdjwt/holder/holder.go 98.66% <100.00%> (+0.30%) ⬆️
pkg/client/didexchange/client.go 92.27% <0.00%> (-0.37%) ⬇️

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

Unit test for SD-JWT Flow

Closes hyperledger-archives#3461

Signed-off-by: Sandra Vrtikapa <[email protected]>
@fqutishat fqutishat merged commit 305117c into hyperledger-archives:main Jan 5, 2023
Copy link
Contributor

@sudeshrshetty sudeshrshetty left a comment

Choose a reason for hiding this comment

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

From Section 5.5.1 of spec

If no Holder Binding JWT is included, the Combined Format for Presentation ends with the ~ character after the last Disclosure.

It means in case of holder disclosure, there will be a stray ~ at the end of disclosures list.

sdJWTSerialized, e := token.Serialize(false)
r.NoError(e)

fmt.Println(fmt.Sprintf("issuer SD-JWT: %s", sdJWTSerialized))
Copy link
Contributor

Choose a reason for hiding this comment

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

is this fmt.println() leftover?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, I left print outs on purpose to show output formats.

@sandrask
Copy link
Contributor Author

sandrask commented Jan 6, 2023

Yes, according to spec if there is no holder binding it should end with ~. I will fix this today since we currently don't have holder binding. I will work on holder binding next week.

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.

Unit Test for SD-JWT Flow (Issuer, Holder, Verifier)
3 participants