private void LogOffAllAPP(LogOffInfo info)
        {
            List <AppLogOffCallBackUrl> urls = info.GetAllRelativeAppsLogOffCallBackUrl();

            this.RenderCallBackUrls(urls);

            PassportSignInSettings.GetConfig().PersistSignInInfo.DeleteRelativeSignInInfo(info.SessionID);
            PassportManager.ClearSignInCookie();
        }
Exemple #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Response.Cache.SetNoStore();
            PassportManager.ClearSignInCookie();
            string url = this.Request.Url.AbsoluteUri;

            url = url.Substring(0, url.LastIndexOf("/") + 1);

            Response.Redirect(PassportManager.GetLogOnOrLogOffUrl(url + "OGUAdmin.aspx", true, true));

            //Response.Redirect(PassportManager.GetLogOnOrLogOffUrl("~/OGUAdmin.aspx", true));
        }
Exemple #3
0
        private void LogOffAllAPP(string sessionID, string appID, string callbackUrl)
        {
            ExceptionHelper.CheckStringIsNullOrEmpty(sessionID, "sessionID");
            ExceptionHelper.CheckStringIsNullOrEmpty(appID, "appID");
            ExceptionHelper.CheckStringIsNullOrEmpty(callbackUrl, "callbackUrl");

            List <AppLogOffCallBackUrl> list =
                PassportSignInSettings.GetConfig().PersistSignInInfo.GetAllRelativeAppsLogOffCallBackUrl(sessionID);

            if (AppLogOffCallBackUrlExist(list, appID, callbackUrl) == false)
            {
                AppLogOffCallBackUrl au = new AppLogOffCallBackUrl();

                au.AppID             = appID;
                au.LogOffCallBackUrl = callbackUrl;

                list.Add(au);
            }

            HtmlTable table = new HtmlTable();

            tableContainer.InnerHtml = string.Empty;
            tableContainer.Controls.Add(table);

            foreach (AppLogOffCallBackUrl au in list)
            {
                HtmlTableRow tRow = new HtmlTableRow();
                table.Controls.Add(tRow);

                HtmlTableCell cell = new HtmlTableCell();
                cell.InnerText = " ";
                tRow.Controls.Add(cell);

                cell = new HtmlTableCell();
                tRow.Controls.Add(cell);

                HtmlImage img = new HtmlImage();
                img.Align = "absmiddle";
                img.Src   = au.LogOffCallBackUrl;
                img.Alt   = img.Src;
                cell.Controls.Add(img);

                cell           = new HtmlTableCell();
                cell.InnerText = string.Format(Translate("退出应用程序{0}"), au.AppID);
                tRow.Controls.Add(cell);
            }

            PassportSignInSettings.GetConfig().PersistSignInInfo.DeleteRelativeSignInInfo(sessionID);
            PassportManager.ClearSignInCookie();
        }
Exemple #4
0
        private void LogOffAllAPP(string sessionID, string appID, string callbackUrl)
        {
            ExceptionHelper.CheckStringIsNullOrEmpty(sessionID, "sessionID");
            ExceptionHelper.CheckStringIsNullOrEmpty(appID, "appID");
            ExceptionHelper.CheckStringIsNullOrEmpty(callbackUrl, "callbackUrl");

            List <AppLogOffCallBackUrl> urls =
                PassportSignInSettings.GetConfig().PersistSignInInfo.GetAllRelativeAppsLogOffCallBackUrl(sessionID);

            if (AppLogOffCallBackUrlExist(urls, appID, callbackUrl) == false)
            {
                AppLogOffCallBackUrl au = new AppLogOffCallBackUrl();

                au.AppID             = appID;
                au.LogOffCallBackUrl = callbackUrl;

                urls.Add(au);
            }

            this.RenderCallBackUrls(urls);

            PassportSignInSettings.GetConfig().PersistSignInInfo.DeleteRelativeSignInInfo(sessionID);
            PassportManager.ClearSignInCookie();
        }