Using the Basic authentication type you have to supply the username that the game client will connect as.
This is perfect if you already have a website or some other source of registered users, and want to allow them to play the game with their current username.
You can also use this system for guest users where you assign a randomly generated username to each user.
Secure Basic Authentication
Per default, anybody can connect to any basic connection with any user if they simply know the gameid and connectionid. Since this is insecure, you can specify that connections should be secured via a hash of the username and a secret key that you setup in the Control Panel.
If your connection is secured, you need to pass in an extra named argument in the Authentication arguments called 'auth' which should contain the calculated hash value.
Generating an authentication hash
The following is how to generate a hash value based on a userId and shared secret using C#. If you are using another language like php, python, or ruby on rails, you will need to implement a method that does the same in that language.
Here's how to generate the auth-hash in java:
Here's how to generate the auth-hash in php:
Here's how to generate the auth-hash in python:
Here is the output from the above code, which is useful if you´re building an implementation in another language.