/*================================================================================================================================== * Public Methods *=================================================================================================================================*/ public questStatus Login(HttpRequestBase request, LoginRequestViewModel loginRequestViewModel, out UserSessionId userSessionId) { // Initialize questStatus status = null; userSessionId = null; // Transfer model UserSession userSession = null; LoginRequest loginRequest = new LoginRequest(); BufferMgr.TransferBuffer(loginRequestViewModel, loginRequest); string ipAddress = null; status = GetIPAddress(request, out ipAddress); if (!questStatusDef.IsSuccess(status)) { return(status); } loginRequest.IPAddress = ipAddress; loginRequest.UserAgent = request.UserAgent; // Perform login AccountMgr accountMgr = new AccountMgr(this.UserSession); status = accountMgr.Login(loginRequest, out userSession); if (!questStatusDef.IsSuccess(status)) { return(status); } // Return user session Id userSessionId = new UserSessionId(userSession.Id); return(new questStatus(Severity.Success)); }