Пример #1
0
        /// <summary>GetNameIDInAssertion</summary>
        /// <param name="xmlDoc">XmlDocument</param>
        /// <param name="samlNsMgr">XmlNamespaceManager</param>
        /// <param name="format">out string</param>
        /// <param name="innerText">out string</param>
        /// <returns>NameID</returns>
        public static XmlNode GetNameIDInAssertion(
            XmlDocument xmlDoc, XmlNamespaceManager samlNsMgr,
            out string format, out string innerText)
        {
            format    = "";
            innerText = "";

            XmlNode nameID = xmlDoc.SelectSingleNode(
                SAML2Const.XPathNameIDInAssertion, samlNsMgr);

            if (nameID != null)
            {
                format    = XmlLib.GetAttributeFromXmlNode(nameID, "Format");
                innerText = nameID.InnerText;
            }

            return(nameID);
        }
Пример #2
0
 /// <summary>GetInResponseToInResponse</summary>
 /// <param name="xmlDoc">XmlDocument</param>
 /// <param name="samlNsMgr">XmlNamespaceManager</param>
 /// <returns>InResponseTo</returns>
 public static string GetInResponseToInResponse(
     XmlDocument xmlDoc, XmlNamespaceManager samlNsMgr)
 {
     return(XmlLib.GetAttributeFromXmlNode(
                xmlDoc.SelectSingleNode(SAML2Const.XPathResponse, samlNsMgr), "InResponseTo"));
 }