The following are the changes that are introduced in 9.0.0. The client SDKs are backwards compatible and you can continue to use the 8.0.1 APIs. However, there are new features and updated behavior detailed below that could affect your application and it is best to review to determine if any changes are needed:
To use Tutorial App version 8.0.1 with the SDK version 9.0.0, set the version number in the file src/gwtutorial/WebContent/config/config.js file to "9.0.0".
The constructor for AuthenticationController takes an additional, optional parameter suggestRegOpts that is an object of type Extras.
If you have a custom implementation of a LiveData interface, you need to modify your setMethods() callback function. The setMethods() function has two new parameters: outcome of type Outcome and message of type string. This function is in the following interfaces: IRegistrationLiveData, IAuthenticationLiveData, ISuggestRegistrationLiveData, IFidoRegistrationLiveData, IManageRegistrationsLiveData.
To improve consistency in naming conventions, a number of AppSdk constants were redefined. The constants' names were changed from containing "EXTRAS_" to containing "EXTRA_". The previously defined constants are marked as deprecated but kept for backward compatibility. For example, AppSdk.EXTRAS_KEY_OPTIONS is deprecated and AppSdk.EXTRA_KEY_OPTIONS is newly defined. The following AppSdk constants are deprecated:
AppSdk.EXTRAS_KEY_OPTIONS, AppSdk.EXTRAS_KEY_OPTIONS_TRANSACTION_TEXT, AppSdk.EXTRAS_KEY_OPTIONS_POLICY_TYPE, AppSdk.EXTRAS_KEY_CONTEXT_DATA, AppSdk.EXTRAS_KEY_CORRELATION_ID, AppSdk.EXTRAS_KEY_STATUS_HANDLE.
Corresponding constants with the EXTRA_ prefix are newly defined.The behavior of AuthenticationController.enable(), when you pass it AutoStart.AUTO_ANY, has changed. You need to modify your code if your application uses the AutoStart.AUTO_ANY mode for authentication.
The promise returned by enable(AutoStart.AUTO_ANY) is rejected only if there is no possibility to complete authentication. If this promise is rejected, your application should not call enable(AutoStart.AUTO_NONE) as it will result in an empty view.
The promise returned by enable(AutoStart.AUTO_ANY) is resolved even if authentication does not succeed and the session is still not available. If this is the case then more authentication methods can be used. Your application should call enable(AutoStart.AUTO_NONE) to get a list of all possible methods:
controller.enable(AutoStart.AUTO_ANY)
.then((autoAnyResult) => {
if (autoAnyResult == null || autoAnyResult.status === AdaptiveStatus.INCOMPLETE) {
//It is not possible to complete authentication with AUTO_ANY.
//Start AUTO_NONE to present the list of choices and continue
// authentication.
controller.enable(AutoStart.AUTO_NONE).then((autoNoneResult) => {
// Authentication completed with AUTO_NONE.
})
.error((autoNoneResult) => {
// Authentication is not possible.
});
} else {
//Authentication completed with AUTO_ANY
}
})
.catch ((failureResult) => {
//It is not possible to complete authentication with any mode
//as there are not enough registered methods available to satisfy
//the adaptive ruleset.
}
FidoRegistrationController and ManageRegistrationsController no longer call onRefresh() after an operation is complete. If you only display the view from one of these controllers at a time, make the following changes:
If you have a custom implementation of IFidoRegistrationLiveData then it must call FidoRegistrationController.onRefresh() after an operation is completed.
If you have a custom implementation of IManageRegistrationsLiveData then it must call ManageRegistrationsController.onRefresh() after an operation is completed.
If you display the view from both of these controllers at the same time, ensure that a change in one view is reflected in other views. Use the new ViewUpdateListener class to keep the views updated. For examples of how to use ViewUpdateListener, refer to the SampleFidoRegistrationUI and SampleManageRegistrationsUI classes in the samples.js file in the Tutorial Web App.
An alternative to using ViewUpdateListener is to implement your own IOperationResultListener.
A new function getIcon() is added to the MethodUIFactory interface. If your application implements the MethodUIFactory interface then it must implement getIcon(). For an example implementation of getIcon(), refer to the SampleMethodUiFactory class in the Controller.js file in the Tutorial Web App.