Instruction for upgrading to Onegini Android SDK to version 6.03

When upgrading from old SDK version to the version 6.03, several changes have to be applied in the end application:

OneginiRegistrationRequestHandler

The OneginiRegistrationRequestHandler interface implementation is now mandatory and has to be passed to the SDK via OneginiClientBuilder constructor.

/**
 * Interface to handle user's registration action.
 */
public interface OneginiRegistrationRequestHandler {

  /**
   * Method called when user has to authenticate in a web browser.
   *
   * @param URL {@link Uri} url that was opened
   */
  void startRegistration(Uri URL, OneginiRegistrationCallback registrationCallback);
}

The OneginiRegistrationRequestHandler#startRegistration() method is called by the SDK whenever user has to authenticate himself in the web browser. In such case you should open an external web browser using provided url.

/**
 * Interface to handle user registration request.
 */
public interface OneginiRegistrationCallback {

  /**
   * Method used to pass the registration callback returned by the web browser
   * @param uri the uri that was returned by the Token Server after
   */
  void handleRegistrationCallback(final Uri uri);

  /**
   * Method used to deny the registration action.
   */
  void denyRegistration();
}

The OneginiRegistrationCallback#handleRegistrationCallback() method has to be used to pass the Uri returned after successful authentication in web browser.

The OneginiRegistrationCallback#denyRegistration() method has to be used when authentication in browser was canceled or incomplete, so the registration flow can be aborted.

OneginiURLHandler

The OneginiURLHandler class has been removed, because it's functionality is duplicated by the mandatory OneginiRegistrationRequestHandler interface.

UserClient#handleRegistrationCallback

The UserClient#handleRegistrationCallback method has been removed, because it's functionality is duplicated by the mandatory OneginiRegistrationCallback interface.