public void SetUp() { var xml = new FileSystem().ReadStringFromFile("sample.xml"); theReader = new SamlResponseXmlReader(xml); theResponse = theReader.Read(); }
public SamlResponse Read(string responseText) { var bytes = Convert.FromBase64String(responseText); var xml = Encoding.UTF8.GetString(bytes); var document = new XmlDocument(); document.LoadXml(xml); var reader = new SamlResponseXmlReader(document); var certificate = _certificates.LoadCertificate(reader.ReadIssuer()); _decryptor.Decrypt(document, certificate); return(reader.Read()); }