DittoIdentity

sealed class DittoIdentity

The various identity configurations that you can use when initializing a Ditto instance.

  • OfflinePlayground: Develop peer-to-peer apps with no cloud connection. This mode offers no security and must only be used for development.

  • OnlineWithAuthentication: Run Ditto in secure production mode, logging on to Ditto Cloud or on on-premises authentication server. User permissions are centrally managed.

  • OnlinePlayground: Test a Ditto Cloud app without authentication ("Playground mode"). This mode offers no security and must only be used for development.

  • SharedKey: 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.

  • Manual: A manually-provided certificate identity. This accepts a base64-encoded bundle.

Types

Link copied to clipboard
class Manual(val certificateConfig: String) : DittoIdentity

A manually-provided certificate identity. This accepts a base64-encoded bundle.

Link copied to clipboard
class OfflinePlayground @JvmOverloads constructor(    val dependencies: DittoDependencies,     val appId: String? = null,     val siteId: BigInteger? = null) : DittoIdentity

Develop peer-to-peer apps with no cloud connection. This mode offers no security and must only be used for development. In this mode, any string can be used as the name of the app.

Link copied to clipboard
class OnlinePlayground @JvmOverloads constructor(    val dependencies: DittoDependencies,     val appId: String,     val token: String,     val enableDittoCloudSync: Boolean = true) : DittoIdentity

Test a Ditto Cloud app with weak shared token authentication ("Playground mode"). This mode is not secure and must only be used for development.

Link copied to clipboard
class OnlineWithAuthentication @JvmOverloads constructor(    val dependencies: DittoDependencies,     val appId: String,     val callback: DittoAuthenticationCallback,     val enableDittoCloudSync: Boolean = true,     val customAuthUrl: String? = null) : DittoIdentity

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.

Link copied to clipboard
class SharedKey @JvmOverloads constructor(    val dependencies: DittoDependencies,     val appId: String,     val sharedKey: String,     val siteId: BigInteger? = null) : DittoIdentity

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.

Functions

Link copied to clipboard
fun requiresOfflineLicenseToken(): Boolean

Inheritors

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard