Example #1
0
        protected override void CreateChildControls()
        {
            base.CreateChildControls();
            byte?appID = Request.GetSsoAppID();

            if (appID.HasValue)
            {
                Cfb.CandidatePortal.Security.Sso.Application app = CPSecurity.Provider.GetApplication(appID.Value);
                if (app != null)
                {
                    _appNameLabel.Text = app.Name;
                    _signoutLink.HRef  = string.Format("{0}?{1}", _signoutLink.HRef, QueryStringManager.MakeQueryString(returnUrl: CPSecurity.GetSsoLoginUrl(appID.Value)).ToQueryString());
                }
            }
            else
            {
                _appNameLabel.Text = CPProviders.SettingsProvider.ApplicationName;
            }
        }
Example #2
0
        protected override void OnPreInit(EventArgs e)
        {
            byte?appID = Request.GetSsoAppID();

            if (appID.HasValue)
            {
                Cfb.CandidatePortal.Security.Sso.Application app = CPSecurity.Provider.GetApplication(appID.Value);
                if (app != null && !string.IsNullOrWhiteSpace(app.LoginPagePath))
                {
                    try
                    {
                        Server.Transfer(app.LoginPagePath, true);
                    }
                    catch (HttpException ex)
                    {
                    }
                }
            }
            base.OnPreInit(e);
        }