Ditto
1.0.8
|
Used to identify a given peer in your network. In practice a peer may be a user, a device, or it might be some other entity in your system. More...
Public Member Functions | |
unsafe void | Dispose () |
Static Public Member Functions | |
static DittoIdentity | Development (string appName="", uint siteId=0) |
Creates a development identity using the provided app name and site ID. If an app name or site ID isn't provided then the SDK will use generated values for them. More... | |
static DittoIdentity | Production (string certificateConfig) |
Creates a production identity using the provided certificate config. More... | |
static DittoIdentity | SharedKey (string appName, string sharedKey, uint siteId=0) |
Creates a shared key identity using the provided app name, private key and site id. If a site ID isn't provided then the SDK will generate a random value. More... | |
Public Attributes | |
readonly DittoIdentityType | Type |
The type of the identity. More... | |
readonly string | AppName |
The app name. More... | |
readonly uint | SiteId |
The site ID. More... | |
readonly string | Key |
The shared private key. More... | |
readonly string | CertificateConfig |
A base64 encoded string representation of a certificate bundle. More... | |
Used to identify a given peer in your network. In practice a peer may be a user, a device, or it might be some other entity in your system.
You can get up and running quickly by using a development identity and then change to using a production identity when you are preparing to deploying Ditto to production.
|
inlinestatic |
Creates a development identity using the provided app name and site ID. If an app name or site ID isn't provided then the SDK will use generated values for them.
appName | Use this to ensure that connections between devices are only established if they share the same app name. |
siteId | Use this to identity different users or devices. Site IDs are persisted between sessions when using a development identity. Site IDs should be unique and not reused by different users or devices. |
DittoIdentity
suitable for use in a development environment.
|
inlinestatic |
Creates a production identity using the provided certificate config.
certificateConfig | A base64 encoded string representation of a certificate bundle. |
DittoIdentity
suitable for use in a production environment.
|
inlinestatic |
Creates a shared key identity using the provided app name, private key and site id. If a site ID isn't provided then the SDK will generate a random value.
appName | Use this to ensure that connections between devices are only established if they share the same app name. |
sharedKey | A base64 DER-encoded private key. Refer to the Ditto documentation for full requirements for shared keys and how to generate them. |
siteId | Use this to identity different users or devices. Site IDs are persisted between sessions when using a development identity. Site IDs should be unique and not reused by different users or devices. |
DittoIdentity
suitable for use in a shared key environment. readonly string DittoSDK.DittoIdentity.AppName |
The app name.
Use this to ensure that connections between devices are only established if they share the same app name.
Note that this is only set if the identity is a development identity.
readonly string DittoSDK.DittoIdentity.CertificateConfig |
A base64 encoded string representation of a certificate bundle.
Note that this is only set if the identity is a production identity.
readonly string DittoSDK.DittoIdentity.Key |
The shared private key.
Include this in your privately-distributed app to provide security against third parties while allowing your devices to connect to each other.
Note that this is only set if the identity is a shared key identity.
readonly uint DittoSDK.DittoIdentity.SiteId |
The site ID.
Use this to identity different users or devices. Site IDs are persisted between sessions if using a development identity.
Site IDs should be unique and not reused by different users or devices.
Note that this is only set if the identity is a development identity.
readonly DittoIdentityType DittoSDK.DittoIdentity.Type |
The type of the identity.