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

Fixed bug on usage of GeneralJwsVerifier and improved its usability #594

Merged
merged 2 commits into from
Nov 3, 2023

Conversation

thehenrytsai
Copy link
Contributor

  1. Fixed bug where a new cache is created every time the DWN performs a signature check
  2. Removed the need to instantiate a new instance of GeneralJwsVerifier every time DWN performs a signature check
  3. Improved perf by not doing DID resolution when the signature check result is already cached
  4. Minor error code naming improvements

Copy link

codesandbox bot commented Nov 2, 2023

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

LiranCohen
LiranCohen previously approved these changes Nov 3, 2023
Copy link
Member

@LiranCohen LiranCohen left a comment

Choose a reason for hiding this comment

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

Looks good! Just a comment in the tests, but isn't an actual problem.

Copy link
Member

@LiranCohen LiranCohen left a comment

Choose a reason for hiding this comment

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

🚀

@codecov-commenter
Copy link

Codecov Report

Merging #594 (737e852) into main (d79901a) will increase coverage by 0.00%.
Report is 1 commits behind head on main.
The diff coverage is 97.82%.

@@           Coverage Diff           @@
##             main     #594   +/-   ##
=======================================
  Coverage   97.82%   97.82%           
=======================================
  Files          66       66           
  Lines        8353     8373   +20     
  Branches     1197     1200    +3     
=======================================
+ Hits         8171     8191   +20     
  Misses        176      176           
  Partials        6        6           
Files Coverage Δ
src/core/auth.ts 100.00% <100.00%> (ø)
src/core/dwn-error.ts 100.00% <100.00%> (ø)
src/utils/jws.ts 90.52% <100.00%> (ø)
src/jose/jws/general/verifier.ts 96.42% <97.43%> (+0.97%) ⬆️

@thehenrytsai thehenrytsai merged commit af4d3f1 into main Nov 3, 2023
@thehenrytsai thehenrytsai deleted the henrytsai/general-jws-verifier branch November 3, 2023 16:32
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.

3 participants