Instruction for upgrading the Onegini Android SDK to version 7.0¶
When upgrading from old SDK 6.X version to the version 7.0, several changes have to be applied in the end application:
Starting from version 7.0.0 the Onegini SDK uses the Retrofit 2 for all internal communication. For resource calls a secured
OkHttpClient from OkHttp 3 is
exposed. The app can use the
OkHttpClient to make resource calls using both Retrofit 2.x and Retrofit 1.x (with an additional 3rd party library).
Example how to use OkHttpClient with Retrofit 2.x
1 2 3 4 5
Example how to use OkHttpClient with Retrofit 1.x
With additional dependency added to the app project:
1 2 3 4 5
Mobile authentication enrollment¶
In previous versions the SDK was exposing the
enrollUserForMobileAuthentication(final String registrationId, final OneginiMobileAuthenticationEnrollmentHandler enrollmentHandler) method to allow the end
user to register for mobile authentication with push.
Starting from 7.0.0 the push enrollment is a two step action. Firstly, the authenticated user has to enroll for the mobile authentication feature using new
UserClient#enrollUserForMobileAuth(final OneginiMobileAuthEnrollmentHandler handler). Only when user has succeeded to enroll for mobile
authentication, he's then allowed to register for a mobile authentication with push using GCM registration ID:
UserClient#enrollUserForMobileAuthWithPush(final String registrationId, final OneginiMobileAuthWithPushEnrollmentHandler enrollmentHandler). Please check the
mobile authentication documentation for details.
Starting from version 7.0.0 the
OneginiError class implements the
public String getErrorDescription() method doesn't exist anymore. Instead the
public String getMessage() should be used.
public Exception getException() method doesn't exist anymore. Instead the
public Throwable getCause() should be used.
Renamed methods and handlers¶
From now on we distinguish two types of mobile authentication: with
Push and with
OTP. Therefore we renamed some method and handlers names listed below.
The list uses a pattern "previous naming -> currently naming":
1 2 3 4 5 6 7 8 9 10 11 12 13
The reason is to be more precise which mobile authentication type the handler is (
OTP). From now on we have shortened
MobileAuth for shorter and cleaner names.
The OpenID Connect functionality is not supported anymore. Therefore:
UserClient#getOpenIdUserInfo()method has been removed
com.nimbusds:nimbus-jose-jwtdependency has been removed
- Apache Commons IO (
commons-io:commons-io:2.5) dependency has been added.