Ditto 4.2.3
|
Run Ditto in secure production mode, logging on to Ditto Cloud or on on-premises authentication server. User permissions are centrally managed. Sync will not work until a successful login has occurred. More...
#include <Identity.hpp>
Public Attributes | |
bool | enable_ditto_cloud_sync |
std::string | custom_auth_url |
Public Attributes inherited from ditto::Identity | |
IdentityType | type |
Additional Inherited Members | |
Static Public Member Functions inherited from ditto::Identity | |
static std::shared_ptr< OfflinePlaygroundIdentity > | OfflinePlayground (std::string app_id="", uint64_t site_id=0) |
Construct a new OfflinePlaygroundIdentity. | |
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="") |
Construct a new OnlineWithAuthenticationIdentity. | |
static std::shared_ptr< OnlinePlaygroundIdentity > | OnlinePlayground (std::string app_id, std::string token, bool enable_ditto_cloud_sync=true) |
Construct a new OnlinePlaygroundIdentity. | |
static std::shared_ptr< SharedKeyIdentity > | SharedKey (std::string app_id, std::string shared_key, uint64_t site_id=0) |
Construct a new SharedKeyIdentity. | |
static std::shared_ptr< ManualIdentity > | Manual (std::string certificate_config) |
Construct a new ManualIdentity. | |
Run Ditto in secure production mode, logging on to Ditto Cloud or on on-premises authentication server. User permissions are centrally managed. Sync will not work until a successful login has occurred.
The only required configuration is the application's ID (UUID), which can be found on the Ditto portal where the app is registered.
By default cloud sync is enabled. This means the SDK will sync to a Big Peer in Ditto's cloud when an internet connection is available. This is controlled by the enable_ditto_cloud_sync
parameter. If true
(default), a suitable wss:// URL will be added to the TransportConfig
. To prevent cloud sync, or to specify your own URL later, pass false
.
Authentication requests are handled by Ditto's cloud by default, configured in the portal at https://portal.ditto.live.
To use a different or on-premises authentication service, pass a custom HTTPS base URL as the custom_auth_url
parameter.
std::string ditto::OnlineWithAuthenticationIdentity::custom_auth_url |
The URL of a custom authentication service that will be used instead of Ditto Cloud, if provided. Otherwise this will be an empty string.
bool ditto::OnlineWithAuthenticationIdentity::enable_ditto_cloud_sync |
Whether or not sync with Ditto cloud is enabled.