protected void Page_Load(object sender, EventArgs e) { PassportManager.CheckAuthenticated(); bool fromCookie = false; ITicket ticket = PassportManager.GetTicket(out fromCookie); ShowTicketInfo(ticket); }
private static ITicket CheckAuthenticatedAndGetTicket(bool autoRedirect) { AuthenticateDirElement aDir = AuthenticateDirSettings.GetConfig().AuthenticateDirs.GetMatchedElement <AuthenticateDirElement>(); bool needRedirect = autoRedirect && (aDir == null || aDir.AutoRedirect); PassportManager.CheckAuthenticated(needRedirect); TicketSource ticketSource = TicketSource.Unknown; return(PassportManager.GetTicket(out ticketSource)); }