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
Add new 'addElement' option to WSSE Security that adds custom xml to <wsse> element (#1362)
* Add additional optional option to WSSE Security classes: `appendElement`.
This allows user to pass a custom xml string that will be added to the WSSE Security element.
* Add tests
---------
Co-authored-by: Vasily Martynov <[email protected]>
Copy file name to clipboardExpand all lines: Readme.md
+21Lines changed: 21 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1025,6 +1025,7 @@ the `options` object is optional and can contain the following properties:
1025
1025
-`hasNonce`: adds Nonce element (default: `false`)
1026
1026
-`mustUnderstand`: adds mustUnderstand=1 attribute to security tag (default: `false`)
1027
1027
-`actor`: if set, adds Actor attribute with given value to security tag (default: `''`)
1028
+
-`appendElement`: A string containing XML element to append to the end of the WSSecurity element. This can be used to add custom elements like certificates or other security tokens (default: `''`)
1028
1029
1029
1030
### WSSecurityCert
1030
1031
@@ -1062,6 +1063,7 @@ The `options` object is optional and can contain the following properties:
1062
1063
-`prefix`: (optional) Adds this value as a prefix for the generated signature tags.
1063
1064
-`attrs`: (optional) A hash of attributes and values attrName: value to add to the signature root node
1064
1065
-`idMode`: (optional) either 'wssecurity' to generate wsse-scoped reference Id on <Body> or undefined for an unscoped reference Id
1066
+
-`appendElement`: (optional) A string containing XML element to append to the end of the WSSecurity element. This can be used to add custom elements like certificates or other security tokens.
WS-Security X509 Certificate support. Just like WSSecurityCert, except that it accepts the input properties as a single object, with two properties added `username` and `password`. Which if added, will add a UsernameToken Element to the xml security element.
// must account for backward compatibility for passwordType String param as well as object options defaults: passwordType = 'PasswordText', hasTimeStamp = true
0 commit comments