I have a Swing application that requires to send login details to a server (written in Node.js) for verification. So far i've managed to successfully send http POST requests and get JSON objects from the server, only problem is, when sniffing with WireShark i can actually see the request body and thus the password and the username in it, so I guess thats not very secured, i don't mind the server, I'm not so sure i want a SSL connection since I dont mind about the objects returning security. my code looks something like that:
// Http members
private AsyncHttpClient asyncHttpClient = new AsyncHttpClient();
and the function to make the call itself is looks like this:
private void login(String username, String password) throws IOException, InterruptedException, ExecutionException {
asyncHttpClient.preparePost(LOGIN_URL).
addFormParam("email", username).
addFormParam("password", password).
execute(new AsyncCompletionHandler<Response>() {
@Override
public Response onCompleted(Response response) {
// do something with the response object
return response;
}
});
}
As you can see nothing elaborate here.
in WireShark the request body looks like this:
Line-based text data: application/x-www-form-urlencoded email=myUserName&password=myPassword
I did try to look around and search for answers both here and other places and reading the documents but it looks like there is a simple way of doing this and I'm just missing something..
Thanks for any answer