[Feature] Allow Node elements to be used as AttributeValue
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- javascript, node.js
- Lĩnh vực
- authentication, backend
Hướng nghiên cứu
Thay đổi liên quan nằm trong node_modules/saml/lib/saml20.js, bên trong createAssertion. Hãy xem lại cách AttributeValue hiện được điền, sau đó kiểm tra các assertion SAML được tạo cho cả giá trị Node và giá trị vô hướng. Hoàn tất khi các phần tử con Node được giữ nguyên dưới dạng giá trị thuộc tính và các giá trị văn bản hiện có vẫn hoạt động.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- JavaScript
- Star
- 73
- Fork
- 90
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của auth0/node-saml
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 10/100
-
Incompatibility with @xmldom/xmldom 0.9.x: DOMParser.parseFromString throws on undefined mimeType Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 45/100
Tất cả issue của auth0/node-saml
Issue tương tự
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 78/100
Mintplex-Labs/anything-llm#6490 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
-
[quality] workflow-scripts guard reads test:unit:coverage as skipping the unit suite, blocking #632 Đang mởagent/quality hive/hosted-available-lke648397-260827-5n31 quality testing
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
area-clientside-dartpad
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100