Instruction for upgrading the Onegini Android SDK to version 9.0

When upgrading to version 9.0 some changes have to be applied in the end application:

Fixed typo in one of OneginiClientBuilder methods

The OneginiClientBuilder used to have public method:

public OneginiClientBuilder setFingerprintAuthenticatioRequestHandler(@NonNull final OneginiFingerprintAuthenticationRequestHandler fingerprintAuthenticatioRequestHandler) {

The method had a spelling error, there was a missing n in Authentication word. The issue is fixed now, the new name of the method is:

public OneginiClientBuilder setFingerprintAuthenticationRequestHandler(@NonNull final OneginiFingerprintAuthenticationRequestHandler fingerprintAuthenticationRequestHandler) {

The functionality of the method stays the same.


The customAuthenticatorInfo class was renamed to CustomInfo. The object is now used to provide results of both custom authentication and custom registration.


The getCustomAuthenticatorInfo method from the OneginiErrorDetails has been renamed to getCustomInfo.


The OneginiRegistrationHandler.onSuccess() has received and additional CustomInfo param:

void onSuccess(UserProfile userProfile, CustomInfo customInfo);

In a case when the user has registered using the CustomIdentityProvider, the object will contain the success status code and optional data received from the Extension Engine. Otherwise, the object will be null.

All public interfaces from package has been moved to package.

UserClient#registerUser method

The registerUser method from the UserClient takes additional param: the Identity Provider.

   * Registers a new profile using the specified OneginiIdentityProvider. The new profile will be generated during the registration process and returned
   * with a success callback.
   * @param identityProvider    the {@link OneginiIdentityProvider} that is used for the registration or null for default.
   * @param scopes              the scopes authentication is requested for, when no scopes are requested the default scopes of the application will be used.
   * @param registrationHandler the registration handler to return the authentication result to
  public void registerUser(@Nullable final OneginiIdentityProvider identityProvider, @NonNull final String[] scopes,
                           @NonNull final OneginiRegistrationHandler registrationHandler) {
    sdkClient.registerUser(identityProvider, scopes, registrationHandler);

This allows you to use the multiple Identity Providers feature. In case when you don't want to use the feature, you can pass null as the first param to let the SDK use the default IDP from the TS config.


The OneginiRegistrationRequestHandler has been renamed to OneginiBrowserRegistrationRequestHandler.

The OneginiBrowserRegistrationRequestHandler implementation is not required anymore if the app doesn't use browser registration (i.e. when registration is done using custom Identity Provider). Because of that the OneginiClientBuilder doesn't require this object in the constructor anymore:

   * Initialize new OneginiBuilder instance.
   * @param context                         Application context should be provided to initialize the SDK
   * @param createPinRequestHandler         instance of {@link OneginiCreatePinRequestHandler} that's responsible for creating new PIN
   * @param pinAuthenticationRequestHandler instance of {@link OneginiPinAuthenticationRequestHandler} that's responsible for authenticating with PIN
  public OneginiClientBuilder(@NonNull final Context context, @NonNull final OneginiCreatePinRequestHandler createPinRequestHandler,
                              @NonNull final OneginiPinAuthenticationRequestHandler pinAuthenticationRequestHandler) {
    // ...

However, if you want to use browser registration, you should still provide the registration handler through new method of the OneginiClientBuilder:

   * Sets the {@link OneginiBrowserRegistrationRequestHandler} implementation that has to be used for authenticating in a web browser.
   * @param browserRegistrationRequestHandler instance of {@link OneginiBrowserRegistrationRequestHandler} that's responsible for authenticating in web browser
   * @return {@link OneginiClientBuilder}
  public OneginiClientBuilder setBrowserRegistrationRequestHandler(@NonNull final OneginiBrowserRegistrationRequestHandler browserRegistrationRequestHandler) {
    // ...


The OneginiRegistrationCallback has been renamed to OneginiBrowserRegistrationCallback.