...
Client Request Properties | PropertyId | PropertyValue | Description | |
---|---|---|---|---|
CLIENT_ID | 1 | string | Unique id for the client; if client doesn't send this property then server will just create id (client-host, client-port, server-host, server-port). | |
ClIENT_READ_TIMEOUT | 2 | int32 | The client will wait for ClIENT_READ_TIMEOUT for server response. It's a optional property. | |
DIFFIE_HELLMAN_KEY | 3 | byte[] | The client Diffie-Hellman key if the credential is required to encrypt. If server has enabled Diffie-Hellman then client must send this to server. |
AuthRequest
The purpose of AuthRequest to authenticate the client connection. A client can send the auth request in
...
the following format. Before sending the auth request a client can verify the server config by sending the ServerConfigRequest. A client can send key-value pair of credentials to authenticate itself.
Those pair needs to serialized in following way. If Diffie-Hellman encryption is enabled on
...
the server side then need to encrypt those serialized bytes. And then send those encrypted bytes to
...
the server. The server will decrypt those bytes and create the key-value pair.
AuthRequest | ( NumberOfProperties PropertyId PropertyValue{ PropertyId PropertyValue} | NumberOfEncryptedBytes EncryptedCredentials ) |
---|---|
NumberOfProperties | fixedSize = 2 bytes, type = int16 |
Propertyid | bytes |
PropertyValue | bytes |
EncrptedCredentials | bytes |
...