/// <summary> /// Starts the session /// </summary> /// <param name="userName"></param> /// <param name="password"></param> public static void startSession(string userName, string password) { // Try and authenticate the user and then store the results in the thread static members AuthenticationResult results = WebServiceFactory.getAuthenticationService().startSession(userName, password); AuthenticationUtils.currentTicket = results.ticket; AuthenticationUtils.currentUserName = results.username; }
/// <summary> /// Ends the session /// </summary> public static void endSession() { if (AuthenticationUtils.currentTicket != null) { WebServiceFactory.getAuthenticationService().endSession(AuthenticationUtils.currentTicket); AuthenticationUtils.currentTicket = null; AuthenticationUtils.currentUserName = null; } }