Older versions¶
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:
Retrofit 2¶
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: com.jakewharton.retrofit:retrofit1-okhttp3-client
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
method: 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.
OneginiError¶
Starting from version 7.0.0 the OneginiError
class implements the Throwable
interface.
The public String getErrorDescription()
method doesn't exist anymore. Instead the public String getMessage()
should be used.
The 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 (push
or OTP
). From now on we have shortened MobileAuthentication
into
MobileAuth
for shorter and cleaner names.
OpenID Connect¶
The OpenID Connect functionality is not supported anymore. Therefore:
- The
UserClient#getOpenIdUserInfo()
method has been removed - The
com.nimbusds:nimbus-jose-jwt
dependency has been removed - Apache Commons IO (
commons-io:commons-io:2.5
) dependency has been added.
Instruction for upgrading the Onegini Android SDK to version 6.06.00¶
When upgrading from old SDK version to the version 6.06.00, there is one small change you need to apply in your application if you use FIDO. Otherwise the changes are transparent and you don't have to apply below change.
Google Guava dependency¶
This library is used internally by FIDO SDK client and from now on we don't include Guava as Onegini's compiled dependency. Instead the Guava has to be provided by the end app in case when FIDO is used in the app.
If this is the case for you then you should add compile 'com.google.guava:guava:19.0'
to your app's gradle file.
Instruction for upgrading the Onegini Android SDK to version 6.04.00¶
When upgrading from old SDK version to the version 6.04.00, there is one small change you need to apply in your application:
OneginiCreatePinRequestHandler¶
The method startPinCreation
from OneginiCreatePinRequestHandler
interface has now additional parameter named pinLength
:
1 2 3 4 5 6 7 8 9 10 |
|
You can use newly added parameter to check the required pin length when building UI with dynamic number of PIN inputs.
Instruction for upgrading the 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.
1 2 3 4 5 6 7 8 9 10 11 12 |
|
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
|
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.
Instruction for upgrading the Onegini Android SDK to version 5.03¶
When upgrading from old SDK version to the version 5.03, several changes have to be applied in the end application:
Pin dialogs¶
From now on "Create PIN" and "Login with PIN" dialogs use newly added UserProfile
ValueObject which can be used to customize those screens with user's profile specific data.
OneginiCreatePinDialog¶
The com.onegini.mobile.sdk.android.library.utils.dialogs.OneginiCreatePinDialog
interface uses new UserProfile userProfile
ValueObject as first parameter in createPin
method:
1 2 3 4 |
|
OneginiCurrentPinDialog¶
The com.onegini.mobile.sdk.android.library.utils.dialogs.OneginiCurrentPinDialog
interface uses new UserProfile userProfile
ValueObject as first parameter in getCurrentPin
method:
1 2 3 4 |
|
Fingerprint dialog¶
The com.onegini.mobile.sdk.android.library.utils.dialogs.OneginiFingerprintDialog
interface uses new UserProfile userProfile
ValueObject as first parameter in showFingerprintPopup
method:
1 2 3 4 |
|
Push authentication dialogs¶
Push authentication dialogs now use new UserProfile
ValueObject that can be used to check which user profile is a receiver of the push message confirmation.
AlertInterface¶
The com.onegini.mobile.sdk.android.library.utils.dialogs.AlertInterface
interface uses new UserProfile receiver
ValueObject as parameter in showAlert
method:
1 2 3 4 5 |
|
ConfirmationWithPin¶
The com.onegini.mobile.sdk.android.library.utils.dialogs.ConfirmationWithPin
interface uses new UserProfile receiver
ValueObject as parameter in showConfirmation
method:
1 2 3 4 5 |
|
ConfirmationWithFingerprint¶
The com.onegini.mobile.sdk.android.library.utils.dialogs.ConfirmationWithFingerprint
interface uses new UserProfile receiver
ValueObject as parameter in showConfirmation
method:
1 2 3 4 |
|
OneginiClientAuthenticationHandler¶
The com.onegini.mobile.sdk.android.library.handlers.OneginiClientAuthenticationHandler
interface has new requestErrorInvalidProfile()
method that's being called when the Token Server returns invalid_profile
error.