56 lines
1.7 KiB
C#
56 lines
1.7 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
using SteamWare;
|
|
|
|
namespace Equa_Auth
|
|
{
|
|
public partial class login : System.Web.UI.Page
|
|
{
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
string AuthCookie = "";
|
|
try
|
|
{
|
|
AuthCookie = Page.Request.QueryString["AuthCookie"].ToString();
|
|
logger.lg.scriviLog(string.Format("Richiesta verifica cookie: {0}", AuthCookie), tipoLog.INFO);
|
|
}
|
|
catch
|
|
{ }
|
|
// salvo nome cookie richiesto
|
|
memLayer.ML.setSessionVal("AuthCookie", AuthCookie);
|
|
// setto modalità login
|
|
mod_login1.modoLogin = SteamWare.loginMode.normale;
|
|
}
|
|
|
|
protected override void OnInit(EventArgs e)
|
|
{
|
|
base.OnInit(e);
|
|
mod_login1.Login_ok += new EventHandler(Mod_login1_Login_ok);
|
|
mod_login1.Login_Error += new EventHandler(Mod_login1_Login_Error);
|
|
}
|
|
|
|
void Mod_login1_Login_Error(object sender, EventArgs e)
|
|
{
|
|
Response.Redirect("./unauthorized.aspx");
|
|
}
|
|
|
|
void Mod_login1_Login_ok(object sender, EventArgs e)
|
|
{
|
|
string nextPage = "";
|
|
try
|
|
{
|
|
nextPage = Page.Request.QueryString["jumpPage"].ToString();
|
|
}
|
|
catch
|
|
{
|
|
nextPage = "./LandingPage.aspx";
|
|
}
|
|
logger.lg.scriviLog(string.Format("Login ok, redirecting to {0}", nextPage), tipoLog.INFO);
|
|
Response.Redirect(nextPage);
|
|
}
|
|
}
|
|
} |