/// <summary> /// Sends the login information to the bus /// </summary> /// <param name="request">The request to be sent to the service bus containg the necessary information</param> /// <returns>The response from the bus</returns> public static ServiceBusResponse sendLogIn(LogInRequest request) { ServiceBusConnection newConnection = new ServiceBusConnection(request.username); ServiceBusResponse response = newConnection.sendLogIn(request); if (response.result == true) { addConnection(request.username, newConnection); Globals.setUser(request.username); } else { newConnection.close(); } return(response); }
/// <summary> /// Sends the login information to the bus /// </summary> /// <param name="request">The request to be sent to the service bus containg the necessary information</param> /// <returns>The response from the bus</returns> public static ServiceBusResponse sendLogIn(LogInRequest request) { ServiceBusConnection newConnection = new ServiceBusConnection(request.username); ServiceBusResponse response = newConnection.sendLogIn(request); if (response.result == true) { addConnection(request.username, newConnection); Globals.setUser(request.username); response.response = "Login Successful"; } else { newConnection.close(); response.response = "Incorrect Username and/or Password"; } return(response); }