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:didReceiveBrowserRegistrationChallenge:

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 id instance in order to hand over control to the SDK and continue the registration action.

- (void)userClient:(ONGUserClient *)userClient didReceiveBrowserRegistrationChallenge:(ONGBrowserRegistrationChallenge *)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

– userClient:didReceiveCustomRegistrationInitChallenge:

Method called when the initialization of two step custom registration requires a optional data to continue. You now need to call the respondWithData:challenge: method of idONGCustomRegistrationChallengeSender instance, in order to provide optional data to the initialization step and continue the two step registration.

- (void)userClient:(ONGUserClient *)userClient didReceiveCustomRegistrationInitChallenge:(ONGCustomRegistrationChallenge *)challenge

Parameters

userClient

user client performing registration

challenge

contains data and identity provider used to perform a registration

Declared In

ONGRegistrationDelegate.h

– userClient:didReceiveCustomRegistrationFinishChallenge:

Method called when the second step of two step custom registration or one step custom registration requires a optional data to continue. You now need to call the respondWithData:challenge: method of idONGCustomRegistrationChallenge instance, in order to provide optional data to the finish step and continue the two step registration.

- (void)userClient:(ONGUserClient *)userClient didReceiveCustomRegistrationFinishChallenge:(ONGCustomRegistrationChallenge *)challenge

Parameters

userClient

user client performing registration

challenge

contains data, identity provider and user profile used to perform a registration

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:info:

Method called when registration action is completed with success.

- (void)userClient:(ONGUserClient *)userClient didRegisterUser:(ONGUserProfile *)userProfile info:(ONGCustomInfo *_Nullable)info

Parameters

userClient

user client performing registration

userProfile

successfully registered user profile

Declared In

ONGRegistrationDelegate.h

– userClient:didRegisterUser:identityProvider:info:

Method called when registration action is completed with success.

- (void)userClient:(ONGUserClient *)userClient didRegisterUser:(ONGUserProfile *)userProfile identityProvider:(ONGIdentityProvider *)identityProvider info:(ONGCustomInfo *_Nullable)info

Parameters

userClient

user client performing registration

userProfile

successfully registered user profile

identityProvider

identity provider for which user registration succeeded.

info

object which contains additional information about successful user registration.

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. This error might include the ONGCustomInfo object into userInfo under the ONGCustomRegistrationInfoKey.

Discussion

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

Declared In

ONGRegistrationDelegate.h

– userClient:didFailToRegisterWithIdentityProvider:error:

Method called when registration action failed with error.

- (void)userClient:(ONGUserClient *)userClient didFailToRegisterWithIdentityProvider:(ONGIdentityProvider *)identityProvider error:(NSError *)error

Parameters

userClient

user client performing registration

identityProvider

identity provider for which an error occured.

error

error describing cause of an error. This error might include the ONGCustomInfo object into userInfo under the ONGCustomRegistrationInfoKey.

Discussion

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

Declared In

ONGRegistrationDelegate.h