Cordova SAP Fiori 客户端 - 如何将 SSO 令牌传递给 FLP URL

Cordova SAP Fiori Client - how to pass SSO Token to FLP URL

我们已经为我们的 FLP 启用了 SAML。当 Android Cordova 应用程序(Fiori 客户端)启动时,我有 SSO 令牌(可用),试图将此令牌传递给 SAP Fiori 客户端中的 Fiori Launchpad URL。 我像下面这样定制了 index.html 但它不起作用。 Cookie 未被传递。

document.addEventListener("deviceready", function() {
            if (sap && sap.AppUpdate) {
                initializeAppUpdateListeners();
                var ssotoken ="<ADERGEVTEMPERERRER>"
     document.cookie = "CORPSSOTOKEN="+ssoToken+";domain=.corp.com;path=/";


            }
        }, false);

下面的方法用于将 cookie 传递给 Fiori 客户端。

public class MainActivity extends CordovaActivity
{
@Override
public void onCreate(Bundle savedInstanceState)
{
    super.onCreate(savedInstanceState);
    // without this line the app crashes when we try to set a cookie
    new XWalkView(this, this).onDestroy();
    XWalkCookieManager cookieManager = new XWalkCookieManager();
    // Note that the cookie must be a persistent cookie (ie: it must have an     expiry), since the Kapsel plugins clear session cookies on startup (but after onCreate).
    cookieManager.setCookie("<replace this with the Fiori launchpad URL>","testCookie=testCookieValue; Expires=Mon, 01-Dec-2036 19:29:56 GMT; Path=/; Secure;");
    // Set by <content src="index.html" /> in config.xml
    loadUrl(launchUrl);
}

}