Instructions for upgrading the Onegini Android SDK to version 8.0
Authenticator registration
The OneginiAuthenticatorRegistrationHandler
returns additional object CustomAuthenticatorInfo
containing additional information when registering a custom
authenticator. In case of other authenticator the parameter will be null.
User authentication
The OneginiAuthenticationHandler
returns additional object CustomAuthenticatorInfo
containing additional information when authenticating with a custom
authenticator. In case of other authenticator the parameter will be null.
Mobile authentication
The OneginiMobileAuthenticationHandler#onSuccess()
returns additional object CustomAuthenticatorInfo
containing additional information when authenticating
with a custom authenticator. In case of other authenticator the parameter will be null.
Firebase Cloud Messaging
Starting from version 8.0.0 the Onegini SDK supports the Firebase Cloud Messaging (FCM) instead of the Google Cloud Messaging (GCM) for sending push notifications and it is strongly recommended to upgrade your application.
Migration
First you need to set up the FCM in the Firebase Console as described in the Token Server documentation.
In order to migrate your application please refer to the Google Documentation
Method for handling push notifications from the UserClient class has been removed:
all usages should be replace with a new method from the same class:
Behavior changes
Incoming push messages will no longer cause the device's screen to be turned on so the user may not notice the authentication request. You should implement a notification mechanism. An example is implemented in the latest version of Onegini Example Application which is available on GitHub.
User authentication
The authenticateUser method behaviour change
In previous versions of the SDK calling method UserClient#authenticateUser()
for already authenticated UserProfile
was returning onSuccess
without
forcing the user to reauthenticate.
Starting from version 8.0.0 the method will logout the current user and will try to authenticate him again - user interaction will be required.
It is strongly recommended to first check, if UserProfile
isn't already authenticated, by calling the method UserProfile#getAuthenticatedUserProfile()
which will return UserProfile
of currently authenticated user, or null
, if no user is currently authenticated.
The reauthenticateUser method removal
Starting from version 8.0.0 the method UserClient#reauthenticateUser
has been removed from the SDK. The method UserClient#authenticateUser
should be used
instead, its behavior has been changed to always enforce user authentication, just like the reauthenticateUser
method did.