Game Development Community

Trying To Do User Authentication Through Master Server

by Valador, Inc. · in Torque Game Engine · 06/16/2006 (9:35 am) · 0 replies

I'm not too familiar with working in the C++ engine code of TGE and it's been a while since I've done any hard core C++ coding so please forgive me if this comes out wrong.

I'm attempting to do user authentication through the master server so that when a user requests the list of servers they have to provide a login/password along with the request. I have the code for sending the login/password to the master server as well as getting a valid/invalid reply back from the master server working fine. The problem is how and where to store the result so it can be used later.

The valid/invalid response is being returned from the master server and ends up in a handleMasterServerLoginCheck function I created in game/net/serverQuery.cc. What I want to do is store that somewhere on the client so that when that client tries to connect to a server, the server can tell if the client has passed Master Server authentication.

Is it a problem to store a variable associated with the client before that client connects to a server that can be read by a server once the client connects? It doesn't seem that I actually have instances of any objects in serverQuery.cc that I could attach this variable to.

Any pointers on how I could get the functionality that I want would be greatly appreciated.

-Fred
(On behalf of Mario's account, who works at the same company as I do)