Esempio n. 1
0
        protected void Application_AuthenticateRequest(Object sender, EventArgs e)
        {
            string     infoCookieName = b.ConfigurationHelper.InfoCookieName;
            HttpCookie authCookie     = Context.Request.Cookies[FormsAuthentication.FormsCookieName];
            HttpCookie infoCookie     = Context.Request.Cookies[infoCookieName];

            if (authCookie != null)
            {
                try
                {
                    FormsAuthenticationTicket authTicket = FormsAuthentication.Decrypt(authCookie.Value);
                    if (authTicket != null)
                    {
                        cc.SiteIdentity  identity  = new cc.SiteIdentity(authTicket, infoCookie);
                        cc.SitePrincipal principal = new cc.SitePrincipal(identity);
                        Context.User = principal;
                    }
                    else
                    {
                        Response.Redirect(b.ConfigurationHelper.AccessDeniedPage);
                    }
                }
                catch (Exception)
                {
                    FormsAuthentication.SignOut();
                }
            }
        }
Esempio n. 2
0
 override protected void OnInit(EventArgs e)
 {
     this.btnBeginLineup.Click     += new EventHandler(btnBeginLineup_Click);
     this.btnUnderstand.Click      += new EventHandler(btnUnderstand_Click);
     this.btnFinishedLooking.Click += new EventHandler(btnFinishedLooking_Click);
     this.btnYes.Click             += new EventHandler(btnYes_Click);
     this.btnNo.Click      += new EventHandler(btnNo_Click);
     this.btnNotSure.Click += new EventHandler(btnNotSure_Click);
     this.btnIdentificationConfirmation.Click += new EventHandler(btnIdentificationConfirmation_Click);
     this.btnContinueLineup.Click             += new EventHandler(btnContinueLineup_Click);
     this.btnFinalComments.Click += new EventHandler(btnFinalComments_Click);
     this.Load += new System.EventHandler(this.Page_Load);
     principal  = (cc.SitePrincipal)Context.User;
     identity   = (cc.SiteIdentity)principal.Identity;
     base.OnInit(e);
 }
Esempio n. 3
0
 public SitePrincipal(SiteIdentity newIdentity)
 {
     userIdentity = newIdentity;
 }