Custom passwords

The TeamSpeak SDK has the optional ability to do custom password handling. This allows the possibility to check TeamSpeak server and channel passwords against an outside datasources, like LDAP or other databases.

To implement custom password, both server and client need to add custom callbacks, which will be spontaneously called whenever a password check is done in TeamSpeak. The SDK developer can implement own checks to validate the password instead of using the TeamSpeak built-in mechanism.


Both Server and Client Lib can implement the following callback to encrypt a user password. This function is called in the Server Lib when a virtual server or channel password are set.

This can be used to hash the password in the same way it is hashed in the outside data store. Or just copy the password to send the clear text to the server.

void onClientPasswordEncrypt(serverID,  
 plaintext,  
 encryptedText,  
 encryptedTextByteSize); 
uint64 serverID;
const char* plaintext;
char* encryptedText;
int encryptedTextByteSize;
 


Implement this callback in the server to check the password provided when a client connects to this server against an outside database. The callback is called whenever a password check if performed, even if no password is set.

unsigned int onCustomServerPasswordCheck(serverID,  
 client,  
 password); 
uint64 serverID;
const struct ClientMiniExport* client;
const char* password;
 

The function should return ERROR_ok if the password is verified, ERROR_server_invalid_password if not verified or ERROR_invalid_param if the password is in an invalid form.


Implement this callback in the server to check the password provided when a client enters a password-protected channel against an outside database. The callback is called whenever a password check if performed, even if no password is set.

unsigned int onCustomChannelPasswordCheck(serverID,  
 client,  
 password); 
uint64 serverID;
const struct ClientMiniExport* client;
const char* password;
 

The function should return ERROR_ok if the password is verified, ERROR_server_invalid_password if not verified or ERROR_invalid_param if the password is in an invalid form.