public LoginResult Login(string kitNumber, string password) { var result = _service.Login(kitNumber, password); _user = result.User; return(result); }
private LoginResult StartSession(string kitNumber, string password) { _logger.LogInfo($"Logging in as {kitNumber}"); var loginResult = _service.Login(kitNumber, password); if (loginResult.ErrorMessage == null) { _logger.LogInfo($"Login successful"); return(loginResult); } _logger.LogError(loginResult.ErrorMessage); if (loginResult.IsLockedOut) { _logger.LogError("Account has been locked out"); } throw new Exception("Login failed"); }