-
Notifications
You must be signed in to change notification settings - Fork 89
Open
Description
Hi! π
Firstly, thanks for your work on this project! π
Today I used patch-package to patch [email protected] for the project I'm working on.
I needed to add some Node elements with specific attributes as AttributeValue in order to create a certain assertion and the current version only allows for textContent to be used. Here is the diff that solved my problem:
diff --git a/node_modules/saml/lib/saml20.js b/node_modules/saml/lib/saml20.js
index 9db8141..1ff00f4 100644
--- a/node_modules/saml/lib/saml20.js
+++ b/node_modules/saml/lib/saml20.js
@@ -216,7 +216,11 @@ function createAssertion(options, strategies, callback) {
// Ignore undefined values in Array
var valueElement = doc.createElementNS(NAMESPACE, 'saml:AttributeValue');
valueElement.setAttribute('xsi:type', options.typedAttributes ? getAttributeType(value) : 'xs:anyType');
- valueElement.textContent = value;
+ if ('nodeType' in Object(value)) {
+ valueElement.appendChild(value);
+ } else {
+ valueElement.textContent = value;
+ }
attributeElement.appendChild(valueElement);
}
});This issue body was partially generated by patch-package.
madaster97
Metadata
Metadata
Assignees
Labels
No labels