How to setup CustomerAuthn Plugin
This plugin is based on the Entersekt CustomerAuthn Plugin from Entersekt. See https://www.entersekt.com/docs/customer-authn for documentation about plugin methods.
Head to Extensibility configurations and input the Username and Password that was provided to you by Entersekt. The plugin will not build without these credentials.Once the credentials are in place publish the module and wait for MABS to build the plugin. Tested and working on MABS 7.1.
Using the plugin block and actions
Demo Example - Biometric Authentication
To be able to send authentication requests you will need an endpointId. This can be found using ECAPlugin_GetSDKInfo action. In the provided demo, the endpointId can be found by tapping 'Get SDK Info'. The endpointId is unique to the device and will change whenever you re-install the app
Final Notes on Authentication
All other callbacks will be triggered in exactly the same manner as the biometric example above i.e:
For detailed information about the actions and the SDK methods they are based off, see the CustomerAuthn Documentation here (Sign up and login required)
Push notifications as seen in the demo
The provided demo uses an implementation of outsystems-cordova-plugin-push (Modified version of cordova-plugin-push). Plugin can be found on the Forge here Cordova Push Plugin
The plugin makes use of ECAPlugin_SetPushConfig & ECAPlugin_HandlePushMessage actions which are configured when the app is registered for push notifications on the Entersekt push notification service. Code on how to implemented it can be found in the demo in the initPushNotifications javascript node
Notifications are coded in JavaScript since the callbacks need to run ECAPlugin_SetPushConfig & ECAPlugin_HandlePushMessage actions. For more information see the PushNotification.init(), .on('notification') and .on('register') methods found in the documentation here.
Local notifications as seen in the demo
Local notifications are implemented using the Local Notifications Plugin found on the Forge. Also makes use of the Mobile Events Forge component to detect if the app is in the background.
Local notifications are send in the OnChallengeCustomer callback of the block
The action first checks if the app is in the background using the Mobile Events blocks that sets the IsPaused variable
Notification is then sent if the app is in the background.