You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Use this.idAttributes[0] when setting id attribute of element? #33
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.)
@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?
Activity
yaronn commentedon Jun 24, 2014
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
lukehorvat commentedon Jun 26, 2014
That's the same line I linked to...? How to override, when
"Id"is hard-coded?yaronn commentedon Jun 26, 2014
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 notifications@github.com
wrote:
I'm on Twitter (@YaronNaveh http://twitter.com/#!/YaronNaveh)
cjbarth commentedon May 29, 2023
@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?
Respect idAttribute when generating signatures.
cjbarth commentedon Oct 24, 2025
If you'd like to pursue this again, please reopen this.