Logon namespace

The Logon plugin provides screen flows to register an app with an SAP Mobile Platform server.



            


The logon plugin is a component of the SAP Mobile Application Framework (MAF), exposed as a Cordova plugin. The basic
idea is that it provides screen flows where the user can enter the values needed to connect to an SAP Mobile Platform 3.0 server and
stores those values in its own secure data vault. This data vault is separate from the one provided with the
encrypted storage plugin. In an OData based SAP Mobile Platform 3.0 application, a client must onboard or register with the SAP Mobile Platform 3.0
server to receive an application connection ID for a particular app. The application connection ID must be sent
along with each request that is proxied through the SAP Mobile Platform 3.0 server to the OData producer.


            


            Adding and Removing the Logon Plugin
            


The Logon plugin is added and removed using the
Cordova CLI.


            


To add the Logon plugin to your project, use the following command:


cordova plugin add <full path to directory containing Kapsel plugins>\logon


            


To remove the Logon plugin from your project, use the following command:


cordova plugin rm com.sap.mp.cordova.plugins.logon

Methods

Name Description
changePassword( onsuccess, onerror ) This method will launch the UI screen for application users to manage and update the back-end passcode that Logon stores in the data vault that is used to authenticate the client to the server.
get( onsuccess, onerror, key ) Get an (JSON serializable) object from the DataVault for a given key.
init( successCallback, errorCallback, applicationId, [context], [logonView] ) Initialization method to set up the Logon plugin.
lock( onsuccess, onerror ) Locks the Logon plugin's secure data vault.
managePasscode( onsuccess, onerror ) This method will launch the UI screen for application users to manage and update the data vault passcode or, if the SMP server's Client Passcode Policy allows it, enable or disable the passcode to the data vault.
set( onsuccess, onerror, key, value ) Set an (JSON serializable) object in the DataVault.
showRegistrationData( onsuccess, onerror ) Calling this method will show a screen which displays the current registration settings for the application.
unlock( onsuccess, onerror )  

Type Definitions

Name Description
errorCallback( errorObject ) Callback function that is invoked in case of an error.
getSuccessCallback( value ) Callback function that is invoked upon successfully retrieving an object from the DataVault.
successCallback( context ) Callback function that is invoked upon successfully registering or unlocking or retrieving the context.
successCallbackNoParameters Callback function that will be invoked with no parameters.

Source

LogonController.js, line 1476.