cancel
Showing results for 
Search instead for 
Did you mean: 

Kapsel Logon Manager Hide Logon Screen

0 Kudos

Hello Friends,

Does anyone know if it is possible to hide the logon manager window that pops up while still being able to use the Logon Manager apis?

Regards,

Brijesh

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Guys, dont bother about the above. I have figured out now how to skip the registration screen. Regards, Brijesh

midhun_vp
Active Contributor
0 Kudos

Hi Brijesh,

Could you please share the solution, that could help others.

Regards,Midhun

SAP Technology RIG

0 Kudos

Hi Midhun,

The SAP Logon init method provided by the Logon Manager plugin takes an argument for passing a custom logon View. Below is the code snippet ( courtesy- Daniel Van Leeuwen 's initial blog on Kapsel)

sap.Logon.init(onLogonInitSuccess, onLogonError, appId, context,logonView);


var logonView = sap.logon.IabUi;

logonView.onShowScreen = customShowScreen;

function customShowScreen(screenId, screenEvents, currentContext) {

    if (screenId =="SCR_SSOPIN_SET") {

        screenEvents.onskip();

        return true;

    }

   else if (screenId =="SCR_UNLOCK") {

        var context = {

        unlockPasscode: "Password1@"

       }

       screenEvents.onsubmit(context);

             return true;

   }

   

    else if (screenId =="SCR_REGISTRATION") {

        screenEvents.onsubmit(currentContext.registrationContext);

        return true;

    }

    else if (screenId =="SCR_SET_PASSCODE_MANDATORY") {

        var context = {

        passcode: "Password1@",

        passcode_CONFIRM: "Password1@"

        }

        screenEvents.onsubmit(context);

        return true;

    }

    else if (screenId =="SCR_SET_PASSCODE_OPT_ON") {

        screenEvents.ondisable();

        return true;

    }

    else if (screenId =="SCR_SET_PASSCODE_OPT_OFF") {

        var context = {};

        screenEvents.onsubmit(context);

        return true;

    }

    return false//skip the default value

}

function customShowNotification(screenId, notifcationKey) {

    if (screenId == "SCR_SSOPIN_SET" || screenId == "SCR_UNLOCK" || screenId == "SCR_REGISTRATION" || screenId == "SCR_SET_PASSCODE_MANDATORY" || screenId == "SCR_SET_PASSCODE_OPT_ON" || screenId == "SCR_SET_PASSCODE_OPT_OFF" ) {

        alert(notifcationKey);

        return true;

    }

    return false;

}

Regards,

Brijesh