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
first,I need to say it vary perfect to me when I test my project on Azure saml. It all most run very well, but when azure callback /saml/acs,the issue was attempt! expected element <Assertion> in name space urn:oasis:names:tc:SAML:2.0:assertion but have http://www.w3.org/2000/09/xmldsig#
the key code is here, it change xml and add xmlns namespane:
`func elementToBytes(el etree.Element) ([]byte, error) {
namespaces := map[string]string{}
for _, childEl := range el.FindElements("//") {
ns := childEl.NamespaceURI()
if ns != "" {
namespaces[childEl.Space] = ns
}
}
doc := etree.NewDocument()
doc.SetRoot(el.Copy())
for space, uri := range namespaces {
doc.Root().CreateAttr("xmlns:"+space, uri)
}
return doc.WriteToBytes()
}`
azure org xml have 4 attr, but this function add 2,the xml become:
`
`
I don't know why need creat attr,some one can tell me if you kown.
The text was updated successfully, but these errors were encountered:
first,I need to say it vary perfect to me when I test my project on Azure saml. It all most run very well, but when azure callback /saml/acs,the issue was attempt!
expected element <Assertion> in name space urn:oasis:names:tc:SAML:2.0:assertion but have http://www.w3.org/2000/09/xmldsig#
the key code is here, it change xml and add xmlns namespane:
`func elementToBytes(el etree.Element) ([]byte, error) {
namespaces := map[string]string{}
for _, childEl := range el.FindElements("//") {
ns := childEl.NamespaceURI()
if ns != "" {
namespaces[childEl.Space] = ns
}
}
}`
azure org xml have 4 attr, but this function add 2,the xml become:
`
`
I don't know why need creat attr,some one can tell me if you kown.
The text was updated successfully, but these errors were encountered: