ONGRegistrationDelegate Protocol Reference

Conforms to NSObject
Declared in ONGRegistrationDelegate.h

Overview

Protocol describing interface for objects implementing methods required to complete registration. All invocations are performed on the main queue.

– userClient:didReceivePinRegistrationChallenge: required method

Method called when registration action requires creation of a PIN to continue.

- (void)userClient:(ONGUserClient *)userClient didReceivePinRegistrationChallenge:(ONGCreatePinChallenge *)challenge

Parameters

userClient

user client performing registration

challenge

create pin challenge used to complete registration

Declared In

ONGRegistrationDelegate.h

– userClient:didReceiveRegistrationRequestChallenge: required method

Method called when the registration action requires you to open a browser with the given URL. When the browser is finished processing it will use a custom URL scheme to hand over control to your application. You now need to call the respondWithURL:challenge: method of idONGRegistrationRequestChallengeSender instance in order to hand over control to the SDK and continue the registration action.

- (void)userClient:(ONGUserClient *)userClient didReceiveRegistrationRequestChallenge:(ONGRegistrationRequestChallenge *)challenge

Parameters

userClient

user client performing registration

challenge

contains URL used to perform a registration code request

Discussion

Example: if the HTTP request is performed by an external web browser, it will call application:openURL:options: method on the AppDelegate. In the implementation of this method the redirect can be handled by calling [challenge.sender respondWithUrl:url challenge:challenge].

Declared In

ONGRegistrationDelegate.h

– userClientDidStartRegistration:

Method called when registration action is started.

- (void)userClientDidStartRegistration:(ONGUserClient *)userClient

Parameters

userClient

user client performing authentication

Declared In

ONGRegistrationDelegate.h

– userClient:didRegisterUser:

Method called when registration action is completed with success.

- (void)userClient:(ONGUserClient *)userClient didRegisterUser:(ONGUserProfile *)userProfile

Parameters

userClient

user client performing registration

userProfile

successfully registered user profile

Declared In

ONGRegistrationDelegate.h

– userClient:didFailToRegisterWithError:

Method called when registration action failed with error.

- (void)userClient:(ONGUserClient *)userClient didFailToRegisterWithError:(NSError *)error

Parameters

userClient

user client performing registration

error

error describing cause of an error

Discussion

The returned error will be either within the ONGGenericErrorDomain or the ONGRegistrationErrorDomain.

Declared In

ONGRegistrationDelegate.h

– userClient:didReceiveRegistrationRequestWithUrl:

Method called when the registration action requires you to open a browser with the given URL. When the browser is finished processing it will use a custom URL scheme to hand over control to your application. You now need to call the handleRegistrationCallback: method of ONGUserClient instance in order to hand over control to the SDK and continue the registration action. If the HTTP request is performed by the embedded web browser the SDK will pick up the redirect back to the app on its own and you don’t need to do anything.

- (void)userClient:(ONGUserClient *)userClient didReceiveRegistrationRequestWithUrl:(NSURL *)url

Parameters

userClient

user client performing registration

url

used to perform a registration code request

Discussion

Example: if the HTTP request is performed by an external web browser, it will call application:openURL:options: method on the AppDelegate. In the implementation of this method the redirect can be handled by calling [[ONGUserClient sharedInstance] handleRegistrationCallback:url].

Declared In

ONGRegistrationDelegate.h