cancel
Showing results for 
Search instead for 
Did you mean: 

Kapsel Logon plugin - bypassing default screens related queries

Former Member
0 Kudos

Hi Experts,

We are having the below observations regarding the SAP Logon plugin. Kindly share your inputs for the same. Since we are not using the default SAP UI screens for registration, we are passing the required user credentials and server parameters as part of the default context passed to sap.Logon.init function.

  1. For iOS, even if the user credentials are wrong, the notification_key raised by the plugin says "ERR_REG_FAILED". Note that this is the same notification key when the server is not reachable. Kindly provide your inputs as for iOS, we are not able to alert the user with the correct error message. (Refer this for more information on notification_key and how a custom IabUI can be used to skip the default registration screen and the passcode screen)

    Note for Android, the notification_key is "ERR_REG_FAILED_UNATHORIZED" if credentials are invalid, and "ERR_REG_FAILED" when server is not reachable.

  2. For Android, occasionally, Afaria client crashes when the application is launched. The sap help blog for Logon plugin does say that for iOS, set keyMAFUseAfaria to false. Although there is no mention about anything on Android. Kindly advice for Android if there is any similar setting change required.

  3. In the same blog, it is said to add two entries to the keychain groups under entitlements. However, we are not able to locate this in our Xcode (v6.2 - 6C131e). But we are able to build and authenticate the users against Active Directory. Just wanted to know if this will create any issue moving forward.


Note that the logon plugin version we are using is 3.8.1(SMP SDK SP08 PL01).

Thank You in advance.

Cheers,

Vigil

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

I was also getting the ERR_REG_FAILED issue.  It was because the passcodes in context did not match with the ones in customShowScreen.  See below.  Make sure you have the same passcode in all five places.

var context = {

                    "serverHost": SMP_SERVER_NAME,

                    "https": "false",

                    "serverPort": SERVER_PORT,

                    "communicatorId": "REST",

                    "user": userName,

                    "password": password,

                    "passcode": "Aaaaaa123",  //note hardcoding passwords and unlock passcodes are strictly for ease of use during development

                                             //once set can be changed by calling sap.Logon.managePasscode()

                    "unlockPasscode": "Aaaaaa123"

                };

function customShowScreen(screenId, screenEvents, currentContext) {

            if (screenId =="SCR_SSOPIN_SET") {

                screenEvents.onskip();

                return true;

            }

        else if (screenId =="SCR_UNLOCK") {

                var context = {

                    unlockPasscode: "Aaaaaa123"

                }

                screenEvents.onsubmit(context);

                return true;

            }

            else if (screenId =="SCR_REGISTRATION") {

                screenEvents.onsubmit(currentContext.registrationContext);

                return true;

            }

            else if (screenId =="SCR_SET_PASSCODE_MANDATORY") {

                var contextOne = {

                        passcode: "Aaaaaa123",

                        passcode_CONFIRM: "Aaaaaa123"

                }

                screenEvents.onsubmit(contextOne);

                return true;

            }

            else if (screenId =="SCR_SET_PASSCODE_OPT_ON") {

                screenEvents.ondisable();

                return true;

            }

            else if (screenId =="SCR_SET_PASSCODE_OPT_OFF") {

                var contextTwo = {};

                screenEvents.onsubmit(contextTwo);

                return true;

            }

            return false;  //skip the default value

        }

tracy_barkley
Employee
Employee
0 Kudos

Virgil,

I cannot assist with 1 or 3, but I found this for an Android Kapsel error.  It is not yet published since it does not reference a location of this code, but perhaps it will help.

Set the PREFERENCE_ID_USEAFARIA Shared Preference to false as follows:

Editor pEditor = prefs.edit();
pEditor.putBoolean(SharedPreferenceKeys.PREFERENCE_ID_USEAFARIA.toString(), false);
pEditor.commit();

Tracy Barkley

Sr. Technical Support Engineer

SAP Active Global Support