Show TOC

initPasscodeManager( successCallback, errorCallback, applicationId, [logonView] ) methodLocate this document in the navigation structure

Initialization method to set up the Logon plugin as a passcode and datavault manager only.

When this method is called, the Logon plugin will not do anything with regards to registering with any server.


This function and sap.Logon.init are mutually exclusive.  Do not call both.

<static> initPasscodeManager( successCallback, errorCallback, applicationId, [logonView] )

Name Type Argument Default Description
<successCallback> sap.Logon~successCallback     The function that is invoked if initialization is successful.The current state is passed to this function as the parameter.
<errorCallback> sap.Logon~errorCallback     The function that is invoked in case of an error.
<applicationId> string     The unique ID of the application.This value will be used as the datavault store ID.
<logonView> string (optional) "com/sap/mp/logon/iabui" The cordova module ID of a custom renderer for the logon, implementing the [showScreen(), close()] interface.Please use the default module unless you are absolutely sure that you can provide your own custom implementation. Please refer to JavaScript files inside your Kapsel project's plugins\logon\www\common\modules\ folder as example.
// a custom UI can be loaded here
var logonView = sap.logon.IabUi;

// The app ID
var applicationId = "someAppID";

var successCallback = function(state){
    alert("successfully initialzed, resulting state: " + JSON.stringify(state));

var errorCallback = function(errorInfo){
    alert("error: " + JSON.stringify(errorInfo));
sap.Logon.initPasscodeManager(successCallback, errorCallback, applicationId, logonView);