Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: calcuate sd_hash in kb JWT #117

Merged
merged 6 commits into from
Feb 28, 2024

Conversation

lukasjhan
Copy link
Member

sd_hash is a base64url hash digest of the presented SD-JWT. So we can calculate that value in our logic.

It closes #108

Signed-off-by: Lukas <Lukas@hopae.io>
Copy link

codecov bot commented Feb 27, 2024

Codecov Report

Attention: Patch coverage is 95.16129% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 95.51%. Comparing base (d503996) to head (1d85fee).

Files Patch % Lines
packages/core/src/index.ts 94.82% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             next     #117      +/-   ##
==========================================
- Coverage   95.54%   95.51%   -0.04%     
==========================================
  Files          21       21              
  Lines        1705     1760      +55     
  Branches      246      253       +7     
==========================================
+ Hits         1629     1681      +52     
- Misses         72       75       +3     
  Partials        4        4              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Lukas <Lukas@hopae.io>
Signed-off-by: Lukas <Lukas@hopae.io>
@cre8
Copy link
Contributor

cre8 commented Feb 27, 2024

@lukasjhan changes are looking good. Just fix the linting error and the PR is ready to be merged

Signed-off-by: Lukas <Lukas@hopae.io>
@lukasjhan
Copy link
Member Author

@lukasjhan changes are looking good. Just fix the linting error and the PR is ready to be merged

I changed it :), I think my vscode has some kind of bug. It changed the indent automatically but not show the diff XD

@cre8
Copy link
Contributor

cre8 commented Feb 27, 2024

A test for createKBJwt would also be nice

@lukasjhan
Copy link
Member Author

A test for createKBJwt would also be nice

Okay I'll add one :)

Signed-off-by: Lukas.J.Han <lukas.j.han@gmail.com>
@lukasjhan
Copy link
Member Author

@cre8 Deleted it because it was an unused function. It was my mistake. :)

@lukasjhan
Copy link
Member Author

hmm.. 0.04%

@lukasjhan lukasjhan merged commit 270ba1b into openwallet-foundation-labs:next Feb 28, 2024
8 of 10 checks passed
cre8 pushed a commit to cre8/sd-jwt-js that referenced this pull request Mar 8, 2024
Signed-off-by: Lukas <Lukas@hopae.io>
Signed-off-by: Lukas.J.Han <lukas.j.han@gmail.com>
Signed-off-by: Mirko Mollik <mirko.mollik@fit.fraunhofer.de>
cre8 pushed a commit that referenced this pull request Mar 8, 2024
Signed-off-by: Lukas <Lukas@hopae.io>
Signed-off-by: Lukas.J.Han <lukas.j.han@gmail.com>
Signed-off-by: Mirko Mollik <mirko.mollik@fit.fraunhofer.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: calculate sd_hash automatically in present function
2 participants