我们已为FLP启用了SAML。启动Android Cordova应用程序(Fiori Client)时,我有SSO令牌(可用),试图将此令牌传递给SAP Fiori Client中的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 Client。
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);
}
}
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句