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

Allow for use of privateKey instead of privateCert #488

Merged
merged 2 commits into from
Nov 3, 2020

Conversation

alon85
Copy link
Contributor

@alon85 alon85 commented Nov 2, 2020

An updated PR to address the conversation here: #387

Minimize mentions of `privateCert` to minimize confusion.
@markstos markstos requested review from cjbarth and markstos November 2, 2020 22:27
Copy link
Contributor

@markstos markstos left a comment

Choose a reason for hiding this comment

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

This has code/docs/tests and is backward compatible. It looks good to me. I updated the docs to further simplify them and focus on the clearer privateKey name instead of the less clear "private cert".

Assigning to @cjbarth for a second look.

@markstos markstos added needs-review Ready for a collaborator to review. semver-minor This PR requires a semver-minor version bump labels Nov 2, 2020
Copy link
Collaborator

@cjbarth cjbarth left a comment

Choose a reason for hiding this comment

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

I just have one suggestion, but I don't think it should block this merge.

@@ -15,15 +16,15 @@ interface SignSamlPostOptions {
export function signSamlPost(samlMessage: string, xpath: string, options: SignSamlPostOptions) {
if (!samlMessage) throw new Error('samlMessage is required');
if (!xpath) throw new Error('xpath is required');
if (!options || !options.privateCert) throw new Error('options.privateCert is required');
if (!options || (!options.privateCert && !options.privateKey)) throw new Error('options.privateCert or options.privateKey is required');
Copy link
Collaborator

Choose a reason for hiding this comment

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

What do you think of issuing a deprecation warning if someone is using privateCert? This way, we can remove this extra code with a future semver-major release.

Copy link
Contributor

Choose a reason for hiding this comment

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

@cjbarth That's OK if you want to add the warning.

Copy link

@RyanCopley RyanCopley left a comment

Choose a reason for hiding this comment

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

👋 Thank you Alon! I hope you are doing well :)

@markstos
Copy link
Contributor

markstos commented Nov 3, 2020

I'm going to go ahead and merge this. We can add a deprecation warning in a future release. It will clean up the code to eventually not support both names.

@markstos markstos merged commit 8046db0 into node-saml:master Nov 3, 2020
@cjbarth cjbarth removed the needs-review Ready for a collaborator to review. label Jan 7, 2021
@cjbarth cjbarth mentioned this pull request May 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-minor This PR requires a semver-minor version bump
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants