Closed localguru closed 7 years ago
Another try, but it's not working:
'mdui:UIInfo': {
"mdui:DisplayName": [
{
"@xml:lang": "de",
"#text": "AAA"
},
{
"@xml:lang": "en",
"#text": "BBB"
}
],
Output is
<mdui:DisplayName xml:lang="en">AAA BBB</mdui:DisplayName>
That code is working:
var metadata = {
'EntityDescriptor': {
'@xmlns': 'urn:oasis:names:tc:SAML:2.0:metadata',
'@xmlns:ds': 'http://www.w3.org/2000/09/xmldsig#',
'@xmlns:mdui': 'urn:oasis:names:tc:SAML:metadata:ui',
'@entityID': this.options.issuer,
'SPSSODescriptor': {
'@protocolSupportEnumeration': 'urn:oasis:names:tc:SAML:2.0:protocol',
'Extensions': {
'mdui:UIInfo':
[
{ 'mdui:DisplayName': { "@xml:lang": "de", "#text": "Mein Titel" } },
{ 'mdui:DisplayName': { "@xml:lang": "en", "#text": "My title" } },
{ 'mdui:Description': { "@xml:lang": "de", "#text": "Ein Test" } },
{ 'mdui:Description': { "@xml:lang": "en", "#text": "a test" } },
{ 'mdui:Logo': { '@height': '85', '@width': '436', '#text': 'https://yourdomain.tld/assets/logo.svg' } },
]
},
'KeyDescriptor': keyDescriptor,
Rocket.Chat Version: 0.56.0 Running Instances: 1 DB Replicaset OpLog: enabled Node Version: 0.45
Hi,
for a shibb IdP I'd like to generate something like this on /_saml/metadata/xyz
My js code in ./programs/server/packages/steffo_meteor-accounts-saml.js:
This code ends up in just one element of DisplayName and Description:
I've posted a ticket on https://github.com/oozcitak/xmlbuilder-js/issues/159 but if I understand it right, with xmlbuilder-js above code can't work, because JS objects cannot have duplicate keys .
Any ideas how to fix it, because I'd like to offer DisplayName and Description in different languages.
Ciao! M.