Registers the client with the server by automatically creating a user with the help of a pre-defined authentication mechanism.
Syntax
public virtual BOOL
registerUser:securityConfig:password:error:isSyncFlag:
(NSString * userName, NSString * securityConfig, NSString * loginPassword, NSError ** error, BOOL isSynchronous)
Parameters
-
userName –
User Name authorized by a predefined security provider.
-
securityConfig –
Security configuration name authenticating the user against an authentication provider.
-
loginPassword –
Password for the user (certificate string in case of certificate registration).
-
error –
Pointer to the error object if the function returns an error.
-
isSynchronous –
Flag to indicate if the user registration is synchronous or ansynchronous.
Returns
BOOL indicating if the user registration has been successful. Significant in case of synchronous registration only. Usage (Synchronous registration) ODPUserManager* userManager = [ODPUserManager getInstance:"ApplicationId"]; [userManager setConnectionProfileWithHost:@"hostname" port:5001 farm:@"farmid" error:nil]; NSError* error = nil; if ([userManager registerUser:"username" securityConfig:@"securityconfig" password:@"password" error:&error isSyncFlag:YES]) { // Further processing } else { // Error handling using the error object defined above } Usage (Asynchronous Registration) ODPUserManager* userManager = [ODPUserManager getInstance:"ApplicationId"]; [userManager setConnectionProfileWithHost:@"hostname" port:5001 farm:@"farmid" error:nil]; [userManager setDelegate:self]; // The class implementing the listener methods should adhere to <ODPUserManagerDelegate> protocol [userManager registerUser:"username" securityConfig:@"securityconfig" password:@"password" error:nil isSyncFlag:NO];