xml-crypto
xml-crypto copied to clipboard
Use this.idAttributes[0] when setting id attribute of element?
I noticed here that the id attribute for elements is set. Can we change the hard-coded "Id"
to this.idAttributes[0]
? That way if one passes in idAttribute
as an option to the SignedXml constructor, it will use that instead.
Basically, I'd like to be able to control whether "Id" or "ID" is outputted when I call SignedXml.computeSignature().
(I'm not familiar with xml-crypto, so my apologies if there's a good reason why it's not this way already.)
actually the code you referenced to is relevant mainly for parsing incoming attributed. For generation currently Id (or wsu:Id) will be used but you can override it withint the library code here: https://github.com/yaronn/xml-crypto/blob/master/lib/signed-xml.js#L483
That's the same line I linked to...? How to override, when "Id"
is hard-coded?
Right now there is no way to override it but you can change the Id in the xml-crypto code for temporary solution
On Thu, Jun 26, 2014 at 8:57 AM, Luke Horvat [email protected] wrote:
That's the same line I linked to...? How to override, when "Id" is hard-coded?
— Reply to this email directly or view it on GitHub https://github.com/yaronn/xml-crypto/issues/33#issuecomment-47190354.
I'm on Twitter (@YaronNaveh http://twitter.com/#!/YaronNaveh)
@bjrmatos @yaronn , instead of hard-coding something and maintaining a fork, would you consider creating a PR with a test suite so that the community can benefit?