Got authentication between the server and the client

This commit is contained in:
jsrobson10 2019-04-10 20:24:41 +10:00
parent 40e469514a
commit 1a4ae14242
2 changed files with 8 additions and 11 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
profiles.json

View File

@ -371,17 +371,13 @@ function connect(profile, connection_id)
//console.log("Sending 1:", data['out']);
// Send status
socket_write(client, g.encryption, 1);
console.log("Trying to get login data");
// Create a variable
var userdata_filename = "servers/"+hostname+":"+port.toString()+".json";
console.log(userdata_filename);
// Try and get the users login data
//var userdata = readFile()
// Send login
console.log("Sending login")
socket_write(client, g.encryption, {
mode: "login",
username: profile.username,
password: profile.password
});
}
});