diff --git a/communication/Server/CommunicationImpl.cs b/communication/Server/CommunicationImpl.cs index deeaf00..8b88e3e 100644 --- a/communication/Server/CommunicationImpl.cs +++ b/communication/Server/CommunicationImpl.cs @@ -45,7 +45,7 @@ public string Token { var json = JObject.Parse(decoder.Decode(value)); Constants.Debug($"Parsing roomID from {json}"); - roomID = (string)json["roomID"]; + roomID = (string)json["roomId"]; Constants.Debug($"roomID = {roomID}"); } token = value; diff --git a/communication/ServerChatTest/Program.cs b/communication/ServerChatTest/Program.cs index 671c1d8..674b981 100644 --- a/communication/ServerChatTest/Program.cs +++ b/communication/ServerChatTest/Program.cs @@ -40,13 +40,8 @@ public static void Main(string[] args) //comm.EndPoint = new IPEndPoint(IPAddress.Parse(t[0]), ushort.Parse(t[1])); //comm.ID = args[1]; Constants.ServerPort = 20000; - comm.IsOffline = false; comm.ServerPort = Constants.ServerPort; - comm.Token = new JwtEncoder(new HMACSHA256Algorithm(), new JsonNetSerializer(), new JwtBase64UrlEncoder()) - .Encode(new JObject - { - ["roomID"] = "123" - }, "key"); + comm.Token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyb29tSWQiOjEsInNlcnZlciI6IlRIVUFJIiwiaWF0IjoxNTg4MjQ0MzA4LCJleHAiOjE1ODgyODc1MDh9.QY5y44mU769_jlLboaqppycI1ijgZnpgkS2NkQWP3XI"; comm.Initialize(); comm.MsgProcess += new MessageHandler(PrintChatMessage); comm.GameStart();