Example #1
0
		private static void EndVerification(HttpWebRequest webReq, string state, HttpWebResponse webRes)
		{
			var content = webRes.GetContent();

			if (Insensitive.Contains(content, "VERIFIED"))
			{
				using (var queries = new WebAPIQueries(state))
				{
					ProcessTransaction(queries);
				}

				RefreshAdminUI();
			}
		}
Example #2
0
		private static void OnReceive(HttpWebRequest req, object state, HttpWebResponse res)
		{
			OnDataReceived(res.GetContent());

			if (_Timeout == null)
			{
				return;
			}

			_Timeout.Stop();
			_Timeout = null;
		}
Example #3
0
        private void HandleConfirmationPrompt(HttpWebResponse res)
        {
            if (!res.ResponseUri.ToString().StartsWith("https://openid.stackexchange.com/account/prompt")) { return; }

            var dom = CQ.Create(res.GetContent());
            var session = dom["input"].First(e => e.Attributes["name"] != null && e.Attributes["name"] == "session");
            var fkey = dom.GetInputValue("fkey");
            var data = "session=" + session["value"] + "&fkey=" + fkey;

            RequestManager.Post(cookieKey, "https://openid.stackexchange.com/account/prompt/submit", data);
        }