static IdpConfig()
        {
            // read the configuration parameters from desk
            string dirName = "spmetadata";

            _spMetadataDict = new Dictionary <string, SPMetadata>();
            if (!Directory.Exists(dirName))
            {
                Directory.CreateDirectory(dirName);
            }
            string[] spMetadataFiles = Directory.GetFiles("spmetadata", "*.xml");
            foreach (string spMetaDataFilePath in spMetadataFiles)
            {
                SPMetadata spMetadata = GetSPMetadataByFileName(spMetaDataFilePath);
                _spMetadataDict.Add(spMetadata.Id, spMetadata);
            }
        }
        public static bool SignIn(string SAMLRequest, string SigAlg, string Signature)
        {
            string deflatedMessage = BusinessLogicUtil.DeflateDecompress(SAMLRequest);

            string SAMLRequest_serviceProviderID;
            {
                XmlDocument xmlDoc_SAMLRequest = new XmlDocument();
                xmlDoc_SAMLRequest.LoadXml(deflatedMessage);
                //XmlElement root = xmlDoc_SAMLRequest.DocumentElement;
                //SAMLRequest_serviceProviderID = root.Attributes["ID"]?.InnerText;

                XmlNodeList nodeList =
                    xmlDoc_SAMLRequest.GetElementsByTagName("Issuer", "urn:oasis:names:tc:SAML:2.0:assertion");
                if (nodeList.Count == 0)
                {
                    throw new Exception($"Issuer not found in SAMLRequest");
                }
                SAMLRequest_serviceProviderID = nodeList[0]?.InnerText;
            }
            //IdpConfig.Instance
            SPMetadata spMetaData = IdpConfig.Instance.GetSPMetadataById(SAMLRequest_serviceProviderID);

            return(false);
        }