-
Notifications
You must be signed in to change notification settings - Fork 474
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
Fix types on SAMLConfig to allow privateKey
#497
Conversation
The docs say to use `privateKey` instead of `privateCert` but when I do that, I get a Typescript error. This should fix that issue.
If this is merged, then other things will break as the subsequent refactoring of Having said that, there are two interfaces at play: |
IMO, if users are not supposed to be using |
I don't think anything will break, @deprecated instruction will only mark a field as deprecated in IDE, no additional effects |
As I look this cover over closer, I see there are places were the deprecation of |
@cjbarth This affects SamlConfig even when SAMLOptions is the one changed.
This works type-wise because SamlConfig is a subset of SAMLOptions, but shows a warning because SamlConfig can't have a A nicer solution might be to have SAML's constructor take a SAMLOptions where the optional fields have ?s, but this PR as-is would fix the typing issue on TypeScript projects using this library. |
@midgleyc I agree with your assessment. I really think these two interfaces should be consolidated. I believe this is just an artifact of the quick conversion to TypeScript that was done. I'll approve this to get things moving, but would you be willing to submit a PR to consolidate these interfaces? |
@nicksrandall, does the recent PR that landed address your concerns here? If so, please close this, otherwise, let's keep the dialog going. |
Closing in favor of #515 |
Description
The docs say to use
privateKey
instead ofprivateCert
but when I do that, I get a Typescript error. This should fix that issue.Checklist: