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

make FileKeyInfo extensible for compatibility with TypeScript #273

Merged
merged 4 commits into from
Feb 26, 2023

Conversation

djaqua
Copy link
Contributor

@djaqua djaqua commented Jan 17, 2023

The type definitions for this awesome library require that the value of SignedXML.keyInfoProvider be an instance of FileKeyInfo, but the methods on FileKeyInfo belong to the instance itself and not the prototype. This issue is only strictly a problem for TypeScript, but this change has a beneficial affect (in terms of reuse) on NodeJS clients, as well, and this is a non-breaking change.

Also adding some documentation to the methods to clear up some of the confusion. Feedback is welcome!

Closes #272

@cjbarth
Copy link
Contributor

cjbarth commented Jan 17, 2023

Should this be a more generic class such that other types of KeyInfo can be used, like StringKeyInfo? I'm thinking of the work done here. It would be nice if all this related code could be coordinated.

@djaqua
Copy link
Contributor Author

djaqua commented Jan 21, 2023

I'm in favor of that. About to push a change to the PR ... let me know what you think

@djaqua
Copy link
Contributor Author

djaqua commented Jan 21, 2023

@cjbarth I just pushed up changes to my branch, let me know what you think!

@cjbarth
Copy link
Contributor

cjbarth commented Jan 21, 2023

Those are some nice changes. I need a little more time to compare them to #249 and related code over at node-saml: node-saml/node-saml#36

These issues have been open a while and I would really appreciate your help to wrangle them all together and get the functionality landed. Any help or comments you provide would be most welcome.

@djaqua
Copy link
Contributor Author

djaqua commented Jan 23, 2023

Good morning @cjbarth ! I'm currently limited to Monday and Friday nights for development, though I may find occasions between to participate in discussions. Would you and @LoneRifle be interested in scheduling a virtual meeting to discuss the project roadmap? I envision an informal grooming session, of sorts, so we can tear through the high priority issues and get ourselves on the same page. Perhaps this way, we can step through the reported issues and formulate a plan of attack.

@djaqua
Copy link
Contributor Author

djaqua commented Feb 16, 2023

@cjbarth & @LoneRifle - I do see why these issues are all related but I think the reality is that if you want to wrangle all the outstanding issues, then we're going to need a new major version number and put some breaking changes into it (that's fair play for a major version change). I'm putting together a proposal to address those issues for the time being and will share once I have something useful to work with.

Either way, I propose merging this PR as a quick victory for the current major version. It doesn't block any solutions for the other issues, and solves the extensibility issue as well as providing a string-based implementation (issue #243 ). At its best, it can be used as a valid step towards addressing the other issues if we choose not to pursue the breaking-changes route. At it's worst, it's a tidy solution for the current version if we do choose to pursue the breaking-changes route.

@LoneRifle
Copy link
Collaborator

LoneRifle commented Feb 17, 2023

I don't mind. I think we also agreed that we want to do a major breaking version with package rename anyway, since xml-crypto has moved to @node-saml. The main blocker would be the lack of types from DefinitelyTyped, but this can be easily addressed by moving the types into this repo.

I realize there is a fair bit of yak-shaving to do, so @djaqua if we need to move quickly, let me know, and I'll strive to find some time to look into this.

cc @cjbarth

@djaqua
Copy link
Contributor Author

djaqua commented Feb 18, 2023

@LoneRifle I've actually been in contact with the maintainer of the Definitely Typed type definitions for this project (there's a bug I volunteered to fix) and once I joined you and @cjbarth on this project I actually asked him to hold off on the fix until the dust settles here.

I don't mind being a co-maintainer or liaison between this project and the type definitions project - I would be glad to help coordinate the maintenance and ensure continuity between the projects 🤷‍♂️

I thought I was the only person still using the expression "yak-shaving" lol

200.gif

Copy link
Collaborator

@LoneRifle LoneRifle left a comment

Choose a reason for hiding this comment

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

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issue with TypeScript and FileKeyInfo
3 participants