Esempio n. 1
0
 internal static MetadataBase Load(Stream metadataStream)
 {
     var serializer = ExtendedMetadataSerializer.ReaderInstance;
     using (var reader = XmlDictionaryReader.CreateTextReader(metadataStream, XmlDictionaryReaderQuotas.Max))
     {
         // Filter out the signature from the metadata, as the built in MetadataSerializer
         // doesn't handle the http://www.w3.org/2000/09/xmldsig# which is allowed (and for SAMLv1
         // even recommended).
         using (var filter = new XmlFilteringReader("http://www.w3.org/2000/09/xmldsig#", "Signature", reader))
         {
             return serializer.ReadMetadata(filter);
         }
     }
 }
Esempio n. 2
0
        internal static MetadataBase Load(Stream metadataStream)
        {
            var serializer = ExtendedMetadataSerializer.ReaderInstance;

            using (var reader = XmlDictionaryReader.CreateTextReader(metadataStream, XmlDictionaryReaderQuotas.Max))
            {
                // Filter out the signature from the metadata, as the built in MetadataSerializer
                // doesn't handle the http://www.w3.org/2000/09/xmldsig# which is allowed (and for SAMLv1
                // even recommended).
                using (var filter = new XmlFilteringReader("http://www.w3.org/2000/09/xmldsig#", "Signature", reader))
                {
                    return(serializer.ReadMetadata(filter));
                }
            }
        }