首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Cordova SAP Fiori客户端-如何将SSO令牌传递给FLP URL

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

Stack Overflow用户
提问于 2016-11-17 21:04:04
回答 1查看 573关注 0票数 0

我们已经为我们的FLP启用了SAML。当Android Cordova App (Fiori Client)启动时,我有SSO令牌(可用),试图将此令牌传递给SAP Fiori客户端中的Fiori Launchpad URL。我像下面这样定制了index.html,但是它不起作用。饼干还没通过呢。

代码语言:javascript
复制
document.addEventListener("deviceready", function() {
            if (sap && sap.AppUpdate) {
                initializeAppUpdateListeners();
                var ssotoken ="<ADERGEVTEMPERERRER>"
     document.cookie = "CORPSSOTOKEN="+ssoToken+";domain=.corp.com;path=/";


            }
        }, false);
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-12-14 19:37:25

下面的代码用于将cookie传递给Fiori客户端。

代码语言:javascript
复制
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);
}

}

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/40664980

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档