From 3774e7f2f03699a398b061da96e9f774121d04df Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Sun, 21 Dec 2014 10:32:45 +0100 Subject: [PATCH] Final URL prettification - Mono test --- Site5/Security/FinalizeLogin.aspx.cs | 5 +++-- Site5/Security/Login.aspx | 2 +- Site5/Security/Login.aspx.cs | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Site5/Security/FinalizeLogin.aspx.cs b/Site5/Security/FinalizeLogin.aspx.cs index 6530774a..2cab37ac 100644 --- a/Site5/Security/FinalizeLogin.aspx.cs +++ b/Site5/Security/FinalizeLogin.aspx.cs @@ -14,12 +14,13 @@ namespace Swarmops.Security if (string.IsNullOrEmpty (identity)) { - Response.Redirect ("Login.aspx"); + Response.Redirect ("Login"); } else { GuidCache.Delete (nonce + "-Identity"); - FormsAuthentication.RedirectFromLoginPage (identity, true); + FormsAuthentication.SetAuthCookie (identity, true); + Response.Redirect ("/"); } } } diff --git a/Site5/Security/Login.aspx b/Site5/Security/Login.aspx index 08dbccf1..a23b417a 100644 --- a/Site5/Security/Login.aspx +++ b/Site5/Security/Login.aspx @@ -118,7 +118,7 @@ success: function(msg) { if (msg.d) { // Login confirmed, fetch auth cookie from nonce in-context - document.location = "/Security/FinalizeLogin.aspx?Nonce=" + bitIdNonce; + document.location = "/Security/FinalizeLogin?Nonce=" + bitIdNonce; } else { // Retry twice per second setTimeout(function() { diff --git a/Site5/Security/Login.aspx.cs b/Site5/Security/Login.aspx.cs index 38b4280e..27855962 100644 --- a/Site5/Security/Login.aspx.cs +++ b/Site5/Security/Login.aspx.cs @@ -78,7 +78,8 @@ namespace Swarmops.Pages.Security Response.AppendCookie (new HttpCookie ("DashboardMessage", HttpUtility.UrlEncode ( "

You have been logged on as Sandbox Administrator to the Swarmops Development Sandbox.


This machine runs the latest development build, so you may run into diagnostic code and half-finished features. All data here is bogus test data and is reset every night.


In other words, welcome, and play away!

"))); - FormsAuthentication.RedirectFromLoginPage ("1,1", true); + FormsAuthentication.SetAuthCookie ("1,1", true); + Response.Redirect ("/"); } // Check for SSL and force it