Ditto 3.0.10
Loading...
Searching...
No Matches
Public Attributes | List of all members
ditto::OnlineWithAuthenticationIdentity Class Reference

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>

Inheritance diagram for ditto::OnlineWithAuthenticationIdentity:
ditto::Identity

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< OfflinePlaygroundIdentityOfflinePlayground (std::string app_id="", uint64_t site_id=0)
 Construct a new OfflinePlaygroundIdentity.
 
static std::shared_ptr< OnlineWithAuthenticationIdentityOnlineWithAuthentication (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< OnlinePlaygroundIdentityOnlinePlayground (std::string app_id, std::string token, bool enable_ditto_cloud_sync=true)
 Construct a new OnlinePlaygroundIdentity.
 
static std::shared_ptr< SharedKeyIdentitySharedKey (std::string app_id, std::string shared_key, uint64_t site_id=0)
 Construct a new SharedKeyIdentity.
 
static std::shared_ptr< ManualIdentityManual (std::string certificate_config)
 Construct a new ManualIdentity.
 

Detailed Description

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.

Member Data Documentation

◆ custom_auth_url

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.

◆ enable_ditto_cloud_sync

bool ditto::OnlineWithAuthenticationIdentity::enable_ditto_cloud_sync

Whether or not sync with Ditto cloud is enabled.