Example #1
0
 private void BISSOGO()
 {
     pMKT.sso.SSOAuthen SSO = new pMKT.sso.SSOAuthen();
     if (Request.QueryString["token"] == null)
     {
         //getting token from bi.multek.com
         Response.Redirect(SSO.getSSOLoginPage(Server.UrlEncode(Request.Url.ToString())));
     }
     else
     {//
         if (Request.QueryString["pair"] != null && Request.QueryString["token"] != null)
         {
             //web service call to sso authen.
             string a = SSO.testAuthentication(Request.QueryString["token"].ToString(), Request.QueryString["pair"].ToString());
             if (a == "failed" || a == "expired" || a == "")
             {
                 /*
                 *******************************************************
                 *  show message if user have no permission to access. *
                 *******************************************************
                 */
                 Label5.Text = "failed to access this application!";
             }
             else
             {
                 string[] Users;
                 Users = a.Trim().Split('\\');
                 if (Users.Length == 2)
                 {
                     securityChecking(Users[0], Users[1]);
                 }
             }
         }
     }
 }
Example #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (Session["usr"] != null)
         {
             nUser nx = (nUser)Session["usr"];
             nx.Dispose();
             Session["usr"] = null;
         }
     }
     FormsAuthentication.SignOut();
     //Response.Redirect("default.aspx");
     /*replaced below section*/
     pMKT.sso.SSOAuthen ssoauth = new pMKT.sso.SSOAuthen();
     string lo = ssoauth.getSSOLogoutPage();
     ssoauth.Dispose();
     Response.Redirect(lo);
 }