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

feat: added JWT handling for limit disclosure Presentation Definition query #3588

Conversation

mishasizov-SK
Copy link
Contributor

Title:
Added JWT handling for limit disclosure Presentation Definition query.

Summary:
After new credential is created based on limit disclosure constraints:

credential, err = createNewCredential(constraints, credentialSrc, template, credential, opts...)
if err != nil {
     return nil, fmt.Errorf("create new credential: %w", err)
}

it always returned in JSON-LD format.

Then, down the code, we check is it JWT in merge func

vcFormat := FormatLDPVC
if credential.JWT != "" {
     vcFormat = FormatJWTVC
}
.....
  desc := &InputDescriptorMapping{
	PathNested: &InputDescriptorMapping{
		Format: vcFormat,
	},
}

I added a code that calculates JWT field in limited disclosure VC based on existing claims.

@codecov
Copy link

codecov bot commented May 17, 2023

Codecov Report

Merging #3588 (fe88438) into main (0284074) will decrease coverage by 0.20%.
The diff coverage is 64.70%.

@@            Coverage Diff             @@
##             main    #3588      +/-   ##
==========================================
- Coverage   87.21%   87.02%   -0.20%     
==========================================
  Files         353      353              
  Lines       48735    48682      -53     
==========================================
- Hits        42504    42364     -140     
- Misses       4686     4773      +87     
  Partials     1545     1545              
Impacted Files Coverage Δ
pkg/doc/presexch/definition.go 84.53% <64.70%> (-0.35%) ⬇️

... and 79 files with indirect coverage changes

@mishasizov-SK mishasizov-SK force-pushed the feat_added_jwt_handling_for_limit_disclosure branch from b82c4f5 to 0067ce1 Compare May 17, 2023 09:57
@mishasizov-SK mishasizov-SK force-pushed the feat_added_jwt_handling_for_limit_disclosure branch from 0067ce1 to fcab965 Compare May 17, 2023 10:04
… query

Signed-off-by: Mykhailo Sizov <mykhailo.sizov@securekey.com>
@mishasizov-SK mishasizov-SK force-pushed the feat_added_jwt_handling_for_limit_disclosure branch from fcab965 to fe88438 Compare May 17, 2023 10:14
@fqutishat fqutishat merged commit ead1113 into hyperledger-archives:main May 17, 2023
@mishasizov-SK mishasizov-SK deleted the feat_added_jwt_handling_for_limit_disclosure branch June 15, 2023 09:13
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.

3 participants