public void Logout() { string CachedLogoutPath = LogoutPath; CswSessionManager.clearSession(); Redirect(CachedLogoutPath); }
protected override void OnInit(EventArgs e) { try { //bz # 9278 CswSessionResourcesNbt = new CswSessionResourcesNbt(Context.Application, Context.Request, Context.Response, Context, string.Empty, CswEnumSetupMode.NbtWeb); CswNbtResources = CswSessionResourcesNbt.CswNbtResources; _CswSessionManager = CswSessionResourcesNbt.CswSessionManager; _CswNbtStatisticsEvents = CswSessionResourcesNbt.CswNbtStatisticsEvents; CswNbtResources.beginTransaction(); // Setup statistics events OnEndOfPageLifeCycle += new EndOfPageLifeCycleHandler(_CswNbtStatisticsEvents.OnEndOfPageLifeCycle); //CswNbtResources.CswNbtNodeFactory.OnWriteNode += new CswNbtNode.OnRequestWriteNodeHandler( _CswNbtStatisticsEvents.OnWriteNode ); //CswNbtResources.CswNbtNodeFactory.OnDeleteNode += new CswNbtNode.OnRequestDeleteNodeHandler( _CswNbtStatisticsEvents.OnDeleteNode ); LogTimerResult("Base.OnInit() started", Timer.ElapsedDurationInSecondsAsString); //bz # 9278 if (_CswSessionManager.IsAuthenticated() && _CswSessionManager.TimedOut) { string LP = LogoutPath; if (Page.Request.IsAuthenticated) { FormsAuthentication.SignOut(); } //ReleaseAll(); //CswSessionResourcesNbt.DeAuthenticate(); //bz # 6163 Redirect(LP); } if (!CswSessionManager.IsAuthenticated()) { string ScriptName = HttpContext.Current.Request.ServerVariables["SCRIPT_NAME"]; if (ScriptName.Substring(ScriptName.LastIndexOf('/')) != "/Main.html") { //ReleaseAll(); Redirect(LogoutPath); } } base.OnInit(e); LogTimerResult("Base.OnInit() finished", Timer.ElapsedDurationInSecondsAsString); } catch (Exception ex) { HandleError(ex); } }//OnInit()
}//Authenticate() public bool IsAuthenticated() { bool ReturnVal = false; if (CswSessionManager.IsAuthenticated()) { ReturnVal = true; CswSessionManager.updateLastAccess(false); } return(ReturnVal); }//IsAuthenticated()
public CswEnumAuthenticationStatus Authenticate(CswWebSvcSessionAuthenticateData.Authentication.Request AuthenticationRequest) { AuthenticationRequest.IpAddress = CswWebSvcCommonMethods.getIpAddress(); return(CswSessionManager.beginSession(AuthenticationRequest)); }//Authenticate()