Skip to content

Support RSA PSS#45

Open
joseph-neeraj wants to merge 31 commits intomainfrom
feat/rsa-pss
Open

Support RSA PSS#45
joseph-neeraj wants to merge 31 commits intomainfrom
feat/rsa-pss

Conversation

@joseph-neeraj
Copy link
Contributor

Support RSA PSS

@joseph-neeraj joseph-neeraj changed the title WIP: Support RSA PSS Support RSA PSS Mar 20, 2026
src/OAuth.js Outdated
OAuth.signSignatureBaseString = function signSignatureBaseString(sbs, signingKey, signatureMethod = DEFAULT_SIGNATURE_METHOD) {
try {
signature = signer.sign(signingKey, "base64");
const signingConfig = SignatureMethod.resolveConfig(signatureMethod)
Copy link
Member

Choose a reason for hiding this comment

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

I would suggest to either to move this code to the other file (rename it to something like Signer) and handle the logic in there or move that code in this file but avoid but in any case avoid resolveConfig implementation

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Renamed SIgnatureMethod.js to Signer.js, moved signing to it, and updated this file to use it.

src/Signer.js Outdated
return signingConfig[method].sign(data, key)
}

function validate(method) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
function validate(method) {
function validateSignatureMethod(method) {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed.

src/Signer.js Outdated
*/
function sign(data, key, method) {
validate(method);
return signingConfig[method].sign(data, key)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
return signingConfig[method].sign(data, key)
return signingConfig[method].sign(data, key);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

}, "base64");
}
}
};
Copy link
Member

Choose a reason for hiding this comment

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

Minor: new line missing.

Suggested change
};
};

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added

Copy link
Contributor Author

@joseph-neeraj joseph-neeraj left a comment

Choose a reason for hiding this comment

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

added review comment fixes

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