diff --git a/.gitignore b/.gitignore index dc2d7ad..b3fd025 100644 --- a/.gitignore +++ b/.gitignore @@ -36,4 +36,7 @@ /project/PrintLocalReport/obj/Release/* -# Equa_Auth \ No newline at end of file +# Equa_Auth +/project/Equa_Auth/obj/Debug/* +/project/Equa_Auth/obj/Release/* +/project/Equa_Auth/obj/EQUA/Package/PackageTmp/* \ No newline at end of file diff --git a/project/Equa_Auth/WebUserControls/mod_login.ascx.cs b/project/Equa_Auth/WebUserControls/mod_login.ascx.cs index d954a57..4e4a4fb 100644 --- a/project/Equa_Auth/WebUserControls/mod_login.ascx.cs +++ b/project/Equa_Auth/WebUserControls/mod_login.ascx.cs @@ -75,7 +75,7 @@ namespace Equa_Auth.WebUserControls if (memLayer.ML.confReadBool("enableCookie")) { // elimino eventuali altri cookie x dominio/user/devName - DataWrap.DW.taAnagDev.delByDominioUserDeviceName(dom_user[0], dom_user[1], DeviceName); + //DataWrap.DW.taAnagDev.delByDominioUserDeviceName(dom_user[0], dom_user[1], DeviceName); // creo nuovo cookie authProxy.createNewCookie(dom_user[0], dom_user[1], DeviceName, userAgent, IPv4, Page.Request.QueryString["AuthCookie"].ToString(), DateTime.Now.AddDays(memLayer.ML.confReadInt("cookieDayExp"))); } @@ -218,11 +218,6 @@ namespace Equa_Auth.WebUserControls bool cookieLogin = false; if (memLayer.ML.confReadBool("enableCookie")) { - //string cookieName = memLayer.ML.StringSessionObj("AuthCookie"); - //if (cookieName == "") - //{ - // cookieName = memLayer.ML.confReadString("AuthCookie"); - //} string cookieName = Page.Request.QueryString["AuthCookie"].ToString(); cookieLogin = authProxy.tryAuthByCookie(cookieName); } diff --git a/project/Equa_Auth/bin/Equa_Auth.dll b/project/Equa_Auth/bin/Equa_Auth.dll index b070441..fb7eb2c 100644 Binary files a/project/Equa_Auth/bin/Equa_Auth.dll and b/project/Equa_Auth/bin/Equa_Auth.dll differ diff --git a/project/XPS/Web.EQUA.config b/project/XPS/Web.EQUA.config index b47ad83..b452cec 100644 --- a/project/XPS/Web.EQUA.config +++ b/project/XPS/Web.EQUA.config @@ -15,7 +15,8 @@ --> - + + diff --git a/project/XPS/Web.config b/project/XPS/Web.config index 18fd1b8..94ec547 100644 --- a/project/XPS/Web.config +++ b/project/XPS/Web.config @@ -1,36 +1,36 @@  - - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - + + + + + + \ No newline at end of file diff --git a/project/XPS/WebUserControls/mod_login.ascx b/project/XPS/WebUserControls/mod_login.ascx index ecdb837..9a78924 100644 --- a/project/XPS/WebUserControls/mod_login.ascx +++ b/project/XPS/WebUserControls/mod_login.ascx @@ -3,7 +3,7 @@ - diff --git a/project/XPS/WebUserControls/mod_login.ascx.cs b/project/XPS/WebUserControls/mod_login.ascx.cs index 76f17ca..b46dded 100644 --- a/project/XPS/WebUserControls/mod_login.ascx.cs +++ b/project/XPS/WebUserControls/mod_login.ascx.cs @@ -250,7 +250,7 @@ namespace XPS.WebUserControls bool cookieLogin = false; if (memLayer.ML.confReadBool("enableCookie")) { - cookieLogin = authProxy.tryAuthByCookie(memLayer.ML.confReadString("CodModulo")); + cookieLogin = authProxy.tryAuthByCookie(memLayer.ML.confReadString("AuthCookie")); } if (!cookieLogin) { diff --git a/project/XPS/bin/XPS.dll b/project/XPS/bin/XPS.dll index 189834e..689d545 100644 Binary files a/project/XPS/bin/XPS.dll and b/project/XPS/bin/XPS.dll differ diff --git a/project/XPS/login.aspx b/project/XPS/login.aspx index c5e5b40..84d8549 100644 --- a/project/XPS/login.aspx +++ b/project/XPS/login.aspx @@ -1,8 +1,16 @@ -<%@ Page Language="C#" MasterPageFile="~/WebMasterPages/MasterAjax.master" AutoEventWireup="true" - Inherits="login" Title="Login" Codebehind="login.aspx.cs" %> +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="login.aspx.cs" Inherits="XPS.login" %> + <%@ Register Src="WebUserControls/mod_login.ascx" TagName="mod_login" TagPrefix="uc1" %> - -
- + + + + + + +
+
+
- + + + diff --git a/project/XPS/login.aspx.cs b/project/XPS/login.aspx.cs index 50c0276..5d4f383 100644 --- a/project/XPS/login.aspx.cs +++ b/project/XPS/login.aspx.cs @@ -1,14 +1,13 @@ using System; -using System.Data; -using System.Configuration; -using System.Collections; +using System.Collections.Generic; +using System.Linq; using System.Web; -using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; -using System.Web.UI.WebControls.WebParts; -using System.Web.UI.HtmlControls; +using SteamWare; +namespace XPS +{ public partial class login : Flesk.Accelerator.Page //System.Web.UI.Page { protected string _nextPage @@ -28,15 +27,34 @@ public partial class login : Flesk.Accelerator.Page //System.Web.UI.Page { // pulisco i record di viewstate vecchi... RemoveViewStateFiles(); - // setto modalità login - Mod_login1.modoLogin = SteamWare.loginMode.normale; + // controllo cookie... + bool cookieLogin = false; + if (memLayer.ML.confReadBool("enableCookie")) + { + cookieLogin = authProxy.tryAuthByCookie(memLayer.ML.confReadString("AuthCookie")); + } + if (!cookieLogin) + { + // compongo stringa x sito auth + string authPage = "./unauthorized.aspx"; + try + { + authPage = string.Format("{0}login.aspx?AuthCookie={1}&jumpPage={2}", memLayer.ML.confReadString("authSite"), memLayer.ML.confReadString("AuthCookie"), memLayer.ML.confReadString("currSite")); + } + catch + { } + Response.Redirect(authPage); + } + + // 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); + 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) @@ -51,7 +69,8 @@ public partial class login : Flesk.Accelerator.Page //System.Web.UI.Page protected override void OnUnload(EventArgs e) { base.OnUnload(e); - Mod_login1.Login_ok -= new EventHandler(Mod_login1_Login_ok); - Mod_login1.Login_Error -= new EventHandler(Mod_login1_Login_Error); + mod_login1.Login_ok -= new EventHandler(Mod_login1_Login_ok); + mod_login1.Login_Error -= new EventHandler(Mod_login1_Login_Error); } } +} diff --git a/project/XPS/login.aspx.designer.cs b/project/XPS/login.aspx.designer.cs index 3418bb7..2ebe863 100644 --- a/project/XPS/login.aspx.designer.cs +++ b/project/XPS/login.aspx.designer.cs @@ -1,23 +1,33 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.4963 // // Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// the code is regenerated. // //------------------------------------------------------------------------------ - - -public partial class login { +namespace XPS { - /// - /// Mod_login1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::XPS.WebUserControls.mod_login Mod_login1; + + public partial class login { + + /// + /// form1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// mod_login1 control. + /// + /// + /// Auto-generated field. + /// To modify move field declaration from designer file to code-behind file. + /// + protected global::XPS.WebUserControls.mod_login mod_login1; + } } diff --git a/project/XPS/obj/Release/XPS.dll b/project/XPS/obj/Release/XPS.dll index 189834e..689d545 100644 Binary files a/project/XPS/obj/Release/XPS.dll and b/project/XPS/obj/Release/XPS.dll differ diff --git a/project/XPST/Web.EQUA.config b/project/XPST/Web.EQUA.config index d9912bf..bcf584d 100644 --- a/project/XPST/Web.EQUA.config +++ b/project/XPST/Web.EQUA.config @@ -15,7 +15,8 @@ --> - + + diff --git a/project/XPST/Web.config b/project/XPST/Web.config index 423b9b8..d0b960c 100644 --- a/project/XPST/Web.config +++ b/project/XPST/Web.config @@ -1,13 +1,4 @@ - - - + @@ -70,7 +61,7 @@ - + @@ -105,8 +96,12 @@ minLocalRequestFreeThreads="4" appRequestQueueLimit="100" /> --> - + + + + + @@ -125,7 +120,7 @@ - + @@ -162,7 +157,7 @@ - + diff --git a/project/XPST/bin/XPST.dll b/project/XPST/bin/XPST.dll index 97573d1..674ba8c 100644 Binary files a/project/XPST/bin/XPST.dll and b/project/XPST/bin/XPST.dll differ diff --git a/project/XPST/obj/Release/XPST.dll b/project/XPST/obj/Release/XPST.dll index 97573d1..674ba8c 100644 Binary files a/project/XPST/obj/Release/XPST.dll and b/project/XPST/obj/Release/XPST.dll differ diff --git a/project/XPS_app.suo b/project/XPS_app.suo index bb9d9ff..8f8c113 100644 Binary files a/project/XPS_app.suo and b/project/XPS_app.suo differ
+