Ditto
1.0.8
|
An identity where every device knows the same secret key. This is a simplistic authentication mode which is normally only suitable for private apps where all the users and devices are trusted. More...
Public Member Functions | |
SharedKeyIdentity (std::string name, std::string key, uint64_t id) | |
Construct a new SharedKeyIdentity. More... | |
Public Attributes | |
std::string | app_name |
std::string | key |
uint64_t | site_id |
An identity where every device knows the same secret key. This is a simplistic authentication mode which is normally only suitable for private apps where all the users and devices are trusted.
ditto::Identity::SharedKeyIdentity::SharedKeyIdentity | ( | std::string | name, |
std::string | key, | ||
uint64_t | id | ||
) |
Construct a new SharedKeyIdentity.
[in] | name | the name of the app, specified in domain format, e.g. "app.ditto.live". All peers must use the same app name to communicate. |
[in] | key | a base64-encoded DER private key. Refer to Ditto documentation for details about generating shared keys. |
[in] | id | the site ID for the device. For shared key mode, this can be left unspecified to choose a random number. |
std::string ditto::Identity::SharedKeyIdentity::app_name |
The app name associated with the identity.
std::string ditto::Identity::SharedKeyIdentity::key |
The base64-encoded DER private key associated with the identity.
uint64_t ditto::Identity::SharedKeyIdentity::site_id |
The site ID associated with the identity.