Ditto 1.1.7
|
The various identity configurations that you can use when initializing a Ditto instance. More...
#include <Identity.hpp>
Static Public Member Functions | |
static std::shared_ptr< DevelopmentIdentity > | Development (std::string app_id="", uint64_t site_id=0, std::string persistence_dir="") |
Construct a new DevelopmentIdentity. More... | |
static std::shared_ptr< OfflinePlaygroundIdentity > | OfflinePlayground (std::string app_id="", uint64_t site_id=0, std::string persistence_dir="") |
Construct a new OfflinePlaygroundIdentity. More... | |
static std::shared_ptr< OnlineIdentity > | Online (std::string app_id, std::shared_ptr< AuthenticationCallback > callback, bool enable_ditto_cloud_sync=true, std::string custom_auth_url="", std::string persistence_dir="") |
Construct a new OnlineIdentity. More... | |
static std::shared_ptr< OnlineWithAuthenticationIdentity > | OnlineWithAuthentication (std::string app_id, std::shared_ptr< AuthenticationCallback > callback, bool enable_ditto_cloud_sync=true, std::string custom_auth_url="", std::string persistence_dir="") |
Construct a new OnlineWithAuthenticationIdentity. More... | |
static std::shared_ptr< OnlinePlaygroundIdentity > | OnlinePlayground (std::string app_id, bool enable_ditto_cloud_sync=true, std::string persistence_dir="") |
Construct a new OnlinePlaygroundIdentity. More... | |
static std::shared_ptr< OnlinePlaygroundV2Identity > | OnlinePlaygroundV2 (std::string app_id, std::string token, bool enable_ditto_cloud_sync=true, std::string persistence_dir="") |
Construct a new OnlinePlaygroundV2Identity. More... | |
static std::shared_ptr< SharedKeyIdentity > | SharedKey (std::string app_id, std::string shared_key, uint64_t site_id=0, std::string persistence_dir="") |
Construct a new SharedKeyIdentity. More... | |
static std::shared_ptr< ManualIdentity > | Manual (std::string certificate_config) |
Construct a new ManualIdentity. More... | |
Public Attributes | |
IdentityType | type |
The various identity configurations that you can use when initializing a Ditto instance.
The different supported identities and when they should be used are as follows:
OfflinePlayground
instead) Develop peer-to-peer apps with no cloud connection. This mode offers no security and must only be used for development.OnlineWithAuthentication
instead) Run Ditto in secure production mode, logging on to Ditto Cloud or on on-premises authentication server. User permissions are centrally managed.
|
static |
Construct a new DevelopmentIdentity.
OfflinePlaygroundIdentity
instead.[in] | app_id | the ID of the app. If you are developing multiple apps, use distinct names to ensure they do not attempt to connect and sync with each other. |
[in] | site_id | the site ID for the device. Use this to identity different users or devices. Site IDs are persisted between sessions when using a development identity. Site IDs should be unique and not reused by different users or devices. |
[in] | persistence_dir | the directory to be used to cache identity-related data. |
|
static |
Construct a new ManualIdentity.
[in] | config | a base64-encoded string representation of a certificate bundle. |
|
static |
Construct a new OfflinePlaygroundIdentity.
[in] | app_id | the ID of the app. If you are developing multiple apps, use distinct names to ensure they do not attempt to connect and sync with each other. |
[in] | site_id | the site ID for the device. Use this to identity different users or devices. Site IDs are persisted between sessions when using a development identity. Site IDs should be unique and not reused by different users or devices. |
[in] | persistence_dir | the directory to be used to cache identity-related data. |
|
static |
Construct a new OnlineIdentity.
OnlineWithAuthenticationIdentity
instead.[in] | appID | a UUID identifying this app registration on the Ditto portal, which can be found at https://portal.ditto.live. |
[in] | callback | a handler for when Ditto requires (re)authentication. |
[in] | enable_ditto_cloud_sync | if true, auto-configure sync with Ditto Cloud. |
[in] | custom_auth_url | if specified, use a custom authentication service instead of Ditto Cloud. |
[in] | persistence_dir | the directory to be used to cache identity-related data. |
|
static |
Construct a new OnlinePlaygroundIdentity.
[in] | appID | a UUID identifying this app registration on the Ditto portal, which can be found at https://portal.ditto.live. |
[in] | enable_ditto_cloud_sync | if true, auto-configure sync with Ditto Cloud. |
[in] | persistence_dir | the directory to be used to cache identity-related data. |
|
static |
Construct a new OnlinePlaygroundV2Identity.
[in] | appID | a UUID identifying this app registration on the Ditto portal, which can be found at https://portal.ditto.live. |
[in] | token | a shared token used to set up the OnlinePlayground session. This token is provided by the Ditto portal when setting up the application. |
[in] | enable_ditto_cloud_sync | if true, auto-configure sync with Ditto Cloud. |
[in] | persistence_dir | the directory to be used to cache identity-related data. |
|
static |
Construct a new OnlineWithAuthenticationIdentity.
[in] | appID | a UUID identifying this app registration on the Ditto portal, which can be found at https://portal.ditto.live. |
[in] | callback | a handler for when Ditto requires (re)authentication. |
[in] | enable_ditto_cloud_sync | if true, auto-configure sync with Ditto Cloud. |
[in] | custom_auth_url | if specified, use a custom authentication service instead of Ditto Cloud. |
[in] | persistence_dir | the directory to be used to cache identity-related data. |
|
static |
Construct a new SharedKeyIdentity.
[in] | app_id | the ID of the app, specified in domain format, e.g. "app.ditto.live". All peers must use the same app ID to communicate. |
[in] | shared_key | a base64-encoded DER private key. Refer to Ditto documentation for details about generating shared keys. |
[in] | site_id | the site ID for the device. For shared key mode, this can be left unspecified to choose a random number. |
[in] | persistence_dir | the directory to be used to cache identity-related data. |