working on server authenticate users
This commit is contained in:
@@ -19,7 +19,7 @@ public sealed class RelaySocketClient
|
||||
public event Action<string>? ServerPublicKeyReceived;
|
||||
public event Action<string>? Log;
|
||||
|
||||
public RelaySocketClient(string username, string url = "ws://localhost:1337/")
|
||||
public RelaySocketClient(string username, string url = "ws://192.168.1.85:5001/")
|
||||
{
|
||||
_username = username;
|
||||
_socket = new WebSocket(url);
|
||||
@@ -32,6 +32,7 @@ public sealed class RelaySocketClient
|
||||
|
||||
var publicKey = KeyStorage.LoadPublicKey(_username);
|
||||
|
||||
SendRaw($"AUTHENTICATE_USER|{_username}|{MainPage._userToken}");
|
||||
SendRaw($"REGISTER_KEY|{_username}|{publicKey}");
|
||||
SendRaw("GET_SERVER_KEY");
|
||||
SendRaw("GET_CHANNELS");
|
||||
|
||||
Reference in New Issue
Block a user