Show TOC

Logon namespaceLocate this document in the navigation structure

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 CLIInformation published on non-SAP site.


            


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
Members
Name Description
applicationId The application ID with which sap.Logon.init was called.
core Direct reference to the logon core object used by the Logon plugin.
loadConfiguration Calling this method to load the configuration before starting registration
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.
deletePasscodeManager( successCallback, errorCallback ) Function to delete the datavault and all data stored therein.
get( onsuccess, onerror, key ) Get an (JSON serializable) object from the DataVault for a given key.
getConfiguration( onsuccess, onerror, key ) Get an (JSON serializable) configuration object from the logon based on configuration type.
init( successCallback, errorCallback, applicationId, [context], [logonView], [certificateProviderClassName] ) Initialization method to set up the Logon plugin.
initPasscodeManager( successCallback, errorCallback, applicationId, [logonView] ) Initialization method to set up the Logon plugin as a passcode and datavault manager only.
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.
refreshCertificate( onsuccess, onerror ) Calling this method to delete the stored certificate and get a new one
set( onsuccess, onerror, key, value ) Set an (JSON serializable) object in the DataVault.
showCertificateProviderScreen( onsuccess, onerror ) Calling this method will show a screen which displays the third party certificate provider settings screen for the application.
showRegistrationData( onsuccess, onerror ) Calling this method will show a screen which displays the current registration settings for the application.
unlock( onsuccess, onerror ) Unlock the Logon plugin's secure data vault if it has been locked (due to being inactive, or sap.Logon.lock being called), then the user is prompted for the passcode to unlock the application.
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.