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

add DPoP keygen and thumbprint #186

Merged
merged 4 commits into from
Feb 22, 2024
Merged

add DPoP keygen and thumbprint #186

merged 4 commits into from
Feb 22, 2024

Conversation

jshawl
Copy link
Member

@jshawl jshawl commented Feb 15, 2024

This PR is a follow-up to #184 and implements key pair generation and a jsonWebKeyThumbprint function that serializes and hashes a JSON web key.

The next (last) PR will implement the JWT creation and signature.

Copy link

codecov bot commented Feb 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (28aa77f) 71.84% compared to head (15022a0) 72.40%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #186      +/-   ##
==========================================
+ Coverage   71.84%   72.40%   +0.56%     
==========================================
  Files          23       23              
  Lines        1900     1939      +39     
  Branches      233      236       +3     
==========================================
+ Hits         1365     1404      +39     
  Misses        525      525              
  Partials       10       10              

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

@jshawl jshawl changed the title DPoP keygen and thumbprint add DPoP keygen and thumbprint Feb 15, 2024
Base automatically changed from dpop to main February 16, 2024 18:17
alphabetize import and clarify base64 test case

add keypair generation and thumbprint confirmation
type KeyPair = {|
privateKey: mixed,
publicKey: mixed,
|};
Copy link
Member Author

Choose a reason for hiding this comment

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

usages
);

keyPair = keyPair || { publicKey, privateKey };
Copy link
Member Author

Choose a reason for hiding this comment

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

^ this is for https://eslint.org/docs/latest/rules/require-atomic-updates

we know no other function mutates keyPair but eslint wanted me to read the value one last time before reassignment.

@jshawl jshawl merged commit c97c16f into main Feb 22, 2024
5 checks passed
@jshawl jshawl deleted the dpop-keygen branch February 22, 2024 18:12
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.

None yet

2 participants