Identities and Security
-
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.
See moreDeclaration
Objective-C
@interface DITIdentity : NSObject
-
The identity types you can use with DittoObjC.
The various identity configurations that you can use when initializing a
DITDitto
instance.- Development: (Deprecated - use OfflinePlayground instead) Develop peer-to-peer apps with no cloud connection. This mode offers no security and must only be used for development.
- OfflinePlayground: Develop peer-to-peer apps with no cloud connection. This mode offers no security and must only be used for development.
- Online: (Deprecated - use OnlineWithAuthentication instead) Run Ditto in secure production mode, logging on to Ditto Cloud or on on-premises authentication server. User permissions are centrally managed.
- OnlineWithAuthentication: Run Ditto in secure production mode, logging on to Ditto Cloud or on on-premises authentication server. User permissions are centrally managed.
- OnlinePlayground: (Deprecated - use OnlinePlaygroundV2 instead) Test a Ditto Cloud app without authentication (“Playground mode”). This mode offers no security and must only be used for development.
- OnlinePlaygroundV2: Test a Ditto Cloud app with weak shared token authentication (“Playground mode”). This mode is not secure 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.
Declaration
Objective-C
enum DITIdentityType : NSUInteger {}
-
Provides access to authentication information and methods for logging on to Ditto Cloud. Relevant when using an
See moreOnlineWithAuthentication
or anOnline
identity.Declaration
Objective-C
@interface DITAuthenticator : NSObject
-
Provides feedback to the developer about Ditto authentication status.
See moreDeclaration
Objective-C
@protocol DITAuthenticationDelegate <NSObject>
-
Undocumented
See moreDeclaration
Objective-C
@interface DITAuthenticationRequest : NSObject @property (nonatomic, nullable, readonly) NSString *appId; @property (nonatomic, nullable, readonly) NSNumber *siteID; @property (nonatomic, nullable, readonly) NSString *thirdPartyToken; @property (nonatomic, nullable, readonly) NSString *tokenSource; @property (nonatomic, nullable, readonly) NSString *username; @property (nonatomic, nullable, readonly) NSString *password; - (void)allow:(DITAuthenticationSuccess *)success; - (void)deny; @end
-
Provides info about the authentication status.
See moreDeclaration
Objective-C
@interface DITAuthenticationStatus : NSObject
-
Undocumented
See moreDeclaration
Objective-C
@interface DITAuthenticationSuccess : NSObject @property (nonatomic, nullable, readwrite) NSString *userID; @property (nonatomic, readwrite) NSMutableDictionary<NSString *, NSString *> *userInfo; @property (nonatomic, readwrite) NSDate *accessExpires; @property (nonatomic, nullable, readwrite) NSDate *offerRefreshUntil; @property (nonatomic, readwrite) NSMutableArray<NSString *> *audiences; @property (nonatomic, readwrite) BOOL readEverythingPermission; @property (nonatomic, readwrite) BOOL writeEverythingPermission; @property (nonatomic, nullable, readwrite) NSMutableDictionary<NSString *, NSMutableArray<NSString *> *> *readPermissions; @property (nonatomic, nullable, readwrite) NSMutableDictionary<NSString *, NSMutableArray<NSString *> *> *writePermissions; - (void)addReadPermissionForCollection:(NSString *)coll queryString:(NSString *)query; - (void)addWritePermissionForCollection:(NSString *)coll queryString:(NSString *)query; @end
-
Posted whenever the authentication status for a specific authenticator did change. You can use
authenticator
propertystatus
to query for the new authentication status.Declaration
Objective-C
extern const NSNotificationName _Nonnull DITAuthenticationStatusDidChangeNotification