DittoIdentity

sealed class DittoIdentity

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

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

  • Online: 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

Development
Link copied to clipboard
class Development @JvmOverloads() constructor(dependencies: DittoDependencies, appID: String?, siteID: BigInteger?) : DittoIdentity
Develop peer-to-peer apps with no cloud connection.
Manual
Link copied to clipboard
class Manual(certificateConfig: String) : DittoIdentity
A manually-provided certificate identity.
Online
Link copied to clipboard
class Online @JvmOverloads() constructor(dependencies: DittoDependencies, appID: String, callback: DittoAuthenticationCallback, enableDittoCloudSync: Boolean, customAuthUrl: String?) : DittoIdentity
Run Ditto in secure production mode, logging on to Ditto Cloud or on on-premises authentication server.
OnlinePlayground
Link copied to clipboard
class OnlinePlayground @JvmOverloads() constructor(dependencies: DittoDependencies, appID: String, enableDittoCloudSync: Boolean) : DittoIdentity
Test a Ditto Cloud app without authentication ("Playground mode").
SharedKey
Link copied to clipboard
class SharedKey @JvmOverloads() constructor(dependencies: DittoDependencies, appID: String, sharedKey: String, siteID: BigInteger?) : DittoIdentity
A mode where any device is trusted provided they know the secret key.

Functions

close
Link copied to clipboard
fun close()

Inheritors

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