RLMUserAPIKeyProviderClient
@interface RLMUserAPIKeyProviderClient : RLMProviderClient
Provider client for user API keys.
-
Creates a user API key that can be used to authenticate as the current user.
Declaration
Objective-C
- (void)createApiKeyWithName:(nonnull NSString *)name completion:(nonnull RLMOptionalUserAPIKeyBlock)completion;
Parameters
name
The name of the API key to be created.
completion
A callback to be invoked once the call is complete.
-
Fetches a user API key associated with the current user.
Declaration
Objective-C
- (void)fetchApiKey:(nonnull RLMObjectId *)objectId completion:(nonnull RLMOptionalUserAPIKeyBlock)completion;
Parameters
objectId
The ObjectId of the API key to fetch.
completion
A callback to be invoked once the call is complete.
-
Fetches the user API keys associated with the current user.
Declaration
Objective-C
- (void)fetchApiKeysWithCompletion:(nonnull RLMUserAPIKeysBlock)completion;
Parameters
completion
A callback to be invoked once the call is complete.
-
Deletes a user API key associated with the current user.
Declaration
Objective-C
- (void)deleteApiKey:(nonnull RLMObjectId *)objectId completion: (nonnull RLMUserAPIKeyProviderClientOptionalErrorBlock)completion;
Parameters
objectId
The ObjectId of the API key to delete.
completion
A callback to be invoked once the call is complete.
-
Enables a user API key associated with the current user.
Declaration
Objective-C
- (void)enableApiKey:(nonnull RLMObjectId *)objectId completion: (nonnull RLMUserAPIKeyProviderClientOptionalErrorBlock)completion;
Parameters
objectId
The ObjectId of the API key to enable.
completion
A callback to be invoked once the call is complete.
-
Disables a user API key associated with the current user.
Declaration
Objective-C
- (void)disableApiKey:(nonnull RLMObjectId *)objectId completion:(nonnull RLMUserAPIKeyProviderClientOptionalErrorBlock) completion;
Parameters
objectId
The ObjectId of the API key to disable.
completion
A callback to be invoked once the call is complete.