I have a requirement to pass XML data in a CDATA section in an attribute in the SAMLResponse. I am using ASP.NET Core and have ComponentSpace v2.0.6. I'm using the low level API. I've seen some forum postings of examples of doing this for ASP.NET. But the same code doesn't compile for the .NET Core. I can't seem to find the methods/classes RegisterAttributeValueSerializer or XmlAttributeValueSerializer. What is the way to do this in .NET Core?
Here's an example that I modified slightly from another forum posting. ComponentSpace.Saml2.Assertions.AttributeType.RegisterAttributeValueSerializer("ppc_plans", SamlConstants.AttributeNameFormats.Basic, new XmlAttributeValueSerializer()); var xmlDocument = new XmlDocument(); xmldocument.LoadXml(vendorNetworkListXmlString); samlAttribute = new SamlAttribute("ppc_plans", SAMLIdentifiers.AttributeNameFormats.Basic, "ppc_plans"); samlAttribute.Values.Add(new AttributeValue(xmldocument.DocumentElement)); attributeStatement.Attributes.Add(samlAttribute);
Thank you
|