WSO2 API Manager - Can I hide tenant stores in the public store?

只谈情不闲聊 提交于 2019-12-05 21:24:17

yes it is possible. First you have to configure api manager to Single Sign-on with SAML2 Please refer this for more details about Single Sign-on with SAML2

Now you have to do some modification on getting login popup when we access the store, as explained below. We can use the subthemes to achieve this customization. Please follow the below instructions to try out the login popup for the store, but this will take you to the tenant listing page once you logged in.

1) In the case you already have a sub theme, then you can use that else you can create the sub themes under the directory AM_HOME/repository/deployment/server/jaggeryapps/store/site/themes/fancy/subthemes directory.

2) And the copy the template.jag from AM_HOME/repository/deployment/server/jaggeryapps/store/site/themes/fancy/templates/menu/primary/template.jag to AM_HOME/repository/deployment/server/jaggeryapps/store/site/themes/fancy/subthemes//templates/menu/primary/template.jag (Please note during this you may need to create the sub directories as mentioned in the destination path). And then please copy the below code

3) Copy the code block given in below to the top of the template.jag page which we created in the step-2.

<%
include("/jagg/jagg.jag");
var user = jagg.getUser();
var mod,httpUrl,httpsUrl;
mod = jagg.module("manager");
httpsUrl= mod.getHTTPsURL();
var httpsURL = httpsUrl + request.getRequestURI();

if(request.getQueryString())
{ httpsURL += "?" + request.getQueryString(); }

if(!user)
{ session.put("showLogin","true"); }

%> 

4) Go to AM_HOME/repository/deployment/server/jaggeryapps/store/site/conf/site.json file, and then add the subtheme as shown in below.

"theme" :
{ "base" : "fancy", "subtheme" : "<name_of_the_theme>" } 

Now start the server and to https://localhost:9443/store then you will be promt with login popup.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!