Yet yet yet yet more debugging

This commit is contained in:
Rick Falkvinge
2014-10-30 23:28:41 +01:00
parent d33596e106
commit 3f0850c69c
2 changed files with 15 additions and 13 deletions
+14 -12
View File
@@ -4,9 +4,11 @@ using System.IO;
using System.Linq;
using System.Web;
using System.Web.ExtensionMethods;
using System.Web.Security;
using System.Web.Services;
using System.Web.UI;
using System.Web.UI.WebControls;
using Swarmops.Logic.Cache;
using Swarmops.Logic.Support;
namespace Swarmops.Security
@@ -15,20 +17,20 @@ namespace Swarmops.Security
{
protected void Page_Load(object sender, EventArgs e)
{
Persistence.Key["BitIdTest_Raw"] = Request.ToRaw();
Persistence.Key["BitIdTest_Uri"] = Request.Params["uri"];
Persistence.Key["BitIdTest_Address"] = Request.Params["address"];
Persistence.Key["BitIdText_Signature"] = Request.Params["signature"];
string nonce = Request.Params["Nonce"];
string identity = GuidCache.Get(nonce + "-Identity") as string;
if (string.IsNullOrEmpty(identity))
{
Response.Redirect("Login.aspx");
}
else
{
GuidCache.Delete(nonce + "-Identity");
FormsAuthentication.RedirectFromLoginPage(identity, true);
}
}
// ReSharper disable once InconsistentNaming
[WebMethod]
public static void callback(string uri, string signature, string address)
{
Persistence.Key["BitIdTest_Uri"] = uri;
Persistence.Key["BitIdTest_Address"] = address;
Persistence.Key["BitIdText_Signature"] = signature;
}
}
}
+1 -1
View File
@@ -246,8 +246,8 @@ namespace Swarmops.Pages.Security
GuidCache.Delete(uri + "-Logon");
GuidCache.Delete(uri + "-LoggedOn");
GuidCache.Set(nonce + "-Identity", result);
FormsAuthentication.RedirectFromLoginPage(result, true); // set auth cookie
return true;
}
catch (Exception e)