sec.samlEntityInsert( entity as element(md.EntityDescriptor) ) as (Number|String)
This function inserts a SAML entity into the Security database.
Parameters | |
---|---|
entity | The SAML entity to be inserted. |
// This function needs a XML element as an argument declareUpdate(); const sec = require('/MarkLogic/security'); const x = new NodeBuilder(); function addCommonAttrs(b) { b.addAttribute("Binding","urn:oasis:names:tc:SAML:2.0:bindings:SOAP"); b.addAttribute("Location","gordon-2:8005/AttributeQuery.xqy") } x.startElement("md:EntityDescriptor","urn:oasis:names:tc:SAML:2.0:metadata"); x.addAttribute("entityID","http://id.example.com/example44"); x.startElement("md:AttributeAuthorityDescriptor","urn:oasis:names:tc:SAML:2.0:metadata"); x.addAttribute("protocolSupportEnumeration","urn:oasis:names:tc:SAML:2.0:protocol"); x.addElement("md:AttributeService",addCommonAttrs,"urn:oasis:names:tc:SAML:2.0:metadata"); x.endElement(); x.endElement(); const entity = x.toNode(); sec.samlEntityInsert(entity);