RLMSyncUser
@interface RLMSyncUser : NSObject
A RLMSyncUser
instance represents a single Realm App user account.
A user may have one or more credentials associated with it. These credentials uniquely identify the user to the authentication provider, and are used to sign into a MongoDB Realm user account.
Note that user objects are only vended out via SDK APIs, and cannot be directly initialized. User objects can be accessed from any thread.
-
The unique MongoDB Realm user ID string identifying this user.
Declaration
Objective-C
@property (readonly, nonatomic, nullable) NSString *identity;
-
Returns an array of identities currently linked to a user.
Declaration
Objective-C
- (nonnull NSArray<RLMSyncUserIdentity *> *)identities;
-
The user’s refresh token used to access the Realm Applcation.
This is required to make HTTP requests to the Realm App’s REST API for functionality not exposed natively. It should be treated as sensitive data.
Declaration
Objective-C
@property (readonly, nonatomic, nullable) NSString *refreshToken;
-
The user’s refresh token used to access the Realm Application.
This is required to make HTTP requests to MongoDB Realm’s REST API for functionality not exposed natively. It should be treated as sensitive data.
Declaration
Objective-C
@property (readonly, nonatomic, nullable) NSString *accessToken;
-
The current state of the user.
Declaration
Objective-C
@property (readonly, nonatomic) RLMSyncUserState state;
-
Create a query-based configuration instance for the given url.
Declaration
Objective-C
- (nonnull RLMRealmConfiguration *)configurationWithPartitionValue: (nonnull id<RLMBSON>)partitionValue;
Parameters
partitionValue
FIXME
Return Value
A default configuration object with the sync configuration set to use the given partition value.
-
Retrieve a valid session object belonging to this user for a given URL, or
nil
if no such object exists.Declaration
Objective-C
- (nullable RLMSyncSession *)sessionForPartitionValue: (nonnull id<RLMBSON>)partitionValue;
-
Retrieve all the valid sessions belonging to this user.
Declaration
Objective-C
- (nonnull NSArray<RLMSyncSession *> *)allSessions;
-
The custom data of the user. This is configured in your MongoDB Realm App.
Declaration
Objective-C
@property (readonly, nonatomic, nullable) NSDictionary *customData;
-
Refresh a user’s custom data. This will, in effect, refresh the user’s auth session.
Declaration
Objective-C
- (void)refreshCustomData: (nonnull RLMUserUserOptionalErrorBlock)completionBlock;