Ditto 1.1.7
Public Attributes | List of all members
ditto::SharedKeyIdentity Class Reference

A mode where any device is trusted provided they know the secret key. This is a simplistic authentication model normally only suitable for private apps where users and devices are both trusted. In this mode, any string may be used as the app id. More...

#include <Identity.hpp>

Inheritance diagram for ditto::SharedKeyIdentity:
ditto::Identity

Public Attributes

std::string app_id
 
std::string shared_key
 
uint64_t site_id
 
- Public Attributes inherited from ditto::Identity
IdentityType type
 

Additional Inherited Members

- Static Public Member Functions inherited from ditto::Identity
static std::shared_ptr< DevelopmentIdentityDevelopment (std::string app_id="", uint64_t site_id=0, std::string persistence_dir="")
 Construct a new DevelopmentIdentity. More...
 
static std::shared_ptr< OfflinePlaygroundIdentityOfflinePlayground (std::string app_id="", uint64_t site_id=0, std::string persistence_dir="")
 Construct a new OfflinePlaygroundIdentity. More...
 
static std::shared_ptr< OnlineIdentityOnline (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< OnlineWithAuthenticationIdentityOnlineWithAuthentication (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< OnlinePlaygroundIdentityOnlinePlayground (std::string app_id, bool enable_ditto_cloud_sync=true, std::string persistence_dir="")
 Construct a new OnlinePlaygroundIdentity. More...
 
static std::shared_ptr< OnlinePlaygroundV2IdentityOnlinePlaygroundV2 (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< SharedKeyIdentitySharedKey (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< ManualIdentityManual (std::string certificate_config)
 Construct a new ManualIdentity. More...
 

Detailed Description

A mode where any device is trusted provided they know the secret key. This is a simplistic authentication model normally only suitable for private apps where users and devices are both trusted. In this mode, any string may be used as the app id.

Member Data Documentation

◆ app_id

std::string ditto::SharedKeyIdentity::app_id

The app ID associated with the identity.

◆ shared_key

std::string ditto::SharedKeyIdentity::shared_key

The base64-encoded DER private key associated with the identity.

◆ site_id

uint64_t ditto::SharedKeyIdentity::site_id

The site ID associated with the identity.