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
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);
}
});
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 asAttributeValue
in order to create a certain assertion and the current version only allows fortextContent
to be used. Here is the diff that solved my problem:This issue body was partially generated by patch-package.
The text was updated successfully, but these errors were encountered: