diff --git a/components/jaggery-apps/publisher/src/main/publisher/site/themes/wso2/css/custom.css b/components/jaggery-apps/publisher/src/main/publisher/site/themes/wso2/css/custom.css index 884648b10..1e933b85f 100644 --- a/components/jaggery-apps/publisher/src/main/publisher/site/themes/wso2/css/custom.css +++ b/components/jaggery-apps/publisher/src/main/publisher/site/themes/wso2/css/custom.css @@ -159,6 +159,29 @@ input.ep-field{ .btn-sequenceUpload{ min-width:155px; } +.sidebar-wrapper .nav i{ + margin-left: 0; +} +.sub-menu li a{ + text-indent: 10px; + color: #666; +} +.sub-sub-menu li a{ + font-size: 13px; + text-indent: 35px; + color: #999; +} + +.sidebar-wrapper { z-index: 1000; position: absolute; left: -350px; width: 350px; height: 100%; overflow-y: auto; -webkit-transition: left 0.5s ease, right 0.5s ease; -o-transition: left 0.5s ease, right 0.5s ease; transition: left 0.5s ease, right 0.5s ease; } +.sidebar-nav ul :not(collapsed) .arrow:before, .sidebar-nav li :not(collapsed) .arrow:before { font-family: "font-wso2"; content: '\e684'; display: inline-block; vertical-align: middle; float: right; font-size: 10px; } +.sidebar-nav ul .collapsed .arrow:before, .sidebar-nav li .collapsed .arrow:before {font-family: "font-wso2";content: '\e685';display: inline-block;vertical-align: middle;float: right;} +.sidebar-nav .sub-menu ul :not(collapsed) .arrow:before, +.sidebar-nav .sub-menu li :not(collapsed) .arrow:before{ + font-size: 6px; +} +.nav-pills.pages > li:last-child{ + margin-bottom: 30px; +} .document-match-icon { position:center; @@ -203,129 +226,43 @@ input.ep-field{ text-transform: capitalize; } - - - - - -/* ============================================================================= - * Wso2.telco styles - * ============================================================================= */ - - -.footer-main { - padding: 10px 0; - width: 100%; - z-index: -1; - min-height: 68px; - color: #9f9f9f; - border-top: solid 1px #ccc; -} - - -.powered-by-logo { - background: transparent url(../images/poweredBy.png) no-repeat scroll 0px 0px; - display: block; - width: 100px; - height: 40px; - cursor: pointer; - padding-right: 10px; +/* Styles for sequence download button. */ +.btn-sequenceDownload:hover { + color: white; !important; + background-color: #5b5b5b !important; } - -.help-links { - border-left: solid 1px #fff; - padding-left: 10px !important; - /* height: 90px; */ +.btn-sequenceDownload { + border: none; + color: white; + background-color: #888888; } -.help-links li { - list-style-type: none; -} - -/*.first-link{ border: none;} */ - -.share-pane a.facebook{ - background:transparent url(../images/facebook_16.png) no-repeat left top; - display: block; - width: 16px; - margin-right: 3px; - height: 16px; - margin-bottom:6px; -} -.share-pane a.linkedin{ - background:transparent url(../images/linkedin_16.png) no-repeat left top; - display: block; - width: 16px; - margin-right: 3px; - height: 16px; - margin-bottom:6px; -} -.share-pane a.twitter{ - background:transparent url(../images/twitter_16.png) no-repeat left top; - display: block; - width: 16px; - margin-right: 3px; - height: 16px; - margin-bottom:6px; -} - - -.copyright_logo { - background: transparent url("../images/logo-inverse.svg") no-repeat scroll left bottom; +.subs-block-unblock-link { display: inline-block; - height: 17px; - margin-bottom: 6px; - vertical-align: middle; - width: 65px; -} - -.custom_hr { - margin-top: 7px; - margin-bottom: 7px; - border: 0; - border-top: 1px solid #F47B20; -} - -.footer p{ margin: 0px !important;} - -body.sticky-footer { - padding-bottom: 140px; + padding-left: 10px; } - -.btn-home { - background: transparent url("../images/home-btn-back.png") no-repeat scroll left top; - border: medium none; - color: #f7941e; - font-size: 18px; - height: 53px; - text-align: center; - text-shadow: none; - width: 182px; -} - -p.intro_text { - margin-bottom: 10px; - margin-top: 10px; - text-align: justify; +.subs-block-unblock { + display: flex; } -.title-section h2 { - border: medium none; - color: #666666; - font-family: "Open Sans","Helvetica Neue",Helvetica,Arial,sans-serif; - font-size: 36px; - font-weight: 200; - line-height: 30px; - margin: 0 0 10px; - padding: 0 0 10px; -} - -.content_underline{border-color: #ffffff; border-width: thin;} - - -.page-content-wrapper, .page-content-wrapper[data-container-behaviour=static] { - margin-bottom: 2%; -} - -.hm-btn-container{ padding-left:0px !important;} +@font-face { + font-family: 'Glyphicons Halflings'; + + src: url('../libs/bootstrap_3.3.5/fonts/glyphicons-halflings-regular.eot'); + src: url('../libs/bootstrap_3.3.5/fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../libs/bootstrap_3.3.5/fonts/glyphicons-halflings-regular.woff2') format('woff2'), url('../libs/bootstrap_3.3.5/fonts/glyphicons-halflings-regular.woff') format('woff'), url('../libs/bootstrap_3.3.5/fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../libs/bootstrap_3.3.5/fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg'); + } + .glyphicon { + position: relative; + top: 1px; + display: inline-block; + font-family: 'Glyphicons Halflings'; + font-style: normal; + font-weight: normal; + line-height: 1; + + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + } + +/*---------------------------------------*/ \ No newline at end of file diff --git a/components/jaggery-apps/publisher/src/main/publisher/site/themes/wso2/libs/load-tabs.js b/components/jaggery-apps/publisher/src/main/publisher/site/themes/wso2/libs/load-tabs.js index 02391d04a..d639a0bb2 100644 --- a/components/jaggery-apps/publisher/src/main/publisher/site/themes/wso2/libs/load-tabs.js +++ b/components/jaggery-apps/publisher/src/main/publisher/site/themes/wso2/libs/load-tabs.js @@ -473,7 +473,7 @@ var loadLC = function () { var initialY = 10; // Center the graph inner.attr("transform", "translate(" + [initialX, initialY] + ") scale(" + initialScale + ")"); - zoom.translate([initialX, initialY]).scale(initialScale); + zoom.translate([initialX, initialY]).scale(initialScale).event(svg); } else { if (json.message == "AuthenticateError") { jagg.showLogin(); diff --git a/components/jaggery-apps/publisher/src/main/publisher/site/themes/wso2/libs/theme-wso2_1.0/css/theme-wso2.css b/components/jaggery-apps/publisher/src/main/publisher/site/themes/wso2/libs/theme-wso2_1.0/css/theme-wso2.css index 5f408bc70..559777dd3 100644 --- a/components/jaggery-apps/publisher/src/main/publisher/site/themes/wso2/libs/theme-wso2_1.0/css/theme-wso2.css +++ b/components/jaggery-apps/publisher/src/main/publisher/site/themes/wso2/libs/theme-wso2_1.0/css/theme-wso2.css @@ -3227,15 +3227,7 @@ footer .icon { vertical-align: middle; color: #cbcbcb; } -footer a { - color: #cbcbcb; -} - -footer a:hover { - color: #d9edf7 !important; -} - -footer a:visited { +footer a, footer a:hover { color: #cbcbcb; } @@ -3246,7 +3238,6 @@ body.sticky-footer footer { position: absolute; bottom: 0; z-index: 1000; - border-top: 1px solid #ffffff; } .fade { @@ -7703,7 +7694,7 @@ body.inverse .fade-edge:after { width: 350px; height: 100%; overflow-y: auto; - background: #333; + background: #222; color: #ffffff; -webkit-transition: all 0.5s ease; -o-transition: all 0.5s ease; diff --git a/components/jaggery-apps/publisher/src/main/publisher/site/themes/wso2/templates/footer/template.jag b/components/jaggery-apps/publisher/src/main/publisher/site/themes/wso2/templates/footer/template.jag index 10f53ca4d..c95259ef6 100644 --- a/components/jaggery-apps/publisher/src/main/publisher/site/themes/wso2/templates/footer/template.jag +++ b/components/jaggery-apps/publisher/src/main/publisher/site/themes/wso2/templates/footer/template.jag @@ -1,72 +1,7 @@ -<% jagg.template("footer", function(inputs, outputs, jagg) { - - var user = jagg.getUser(); - %> - +<% jagg.template("footer", function(inputs, outputs, jagg) { %> <% }); %> - - - diff --git a/components/jaggery-apps/publisher/src/main/publisher/site/themes/wso2/templates/item-implement/js/api-implementation.js b/components/jaggery-apps/publisher/src/main/publisher/site/themes/wso2/templates/item-implement/js/api-implementation.js index 68998aec4..d0cfbdc30 100644 --- a/components/jaggery-apps/publisher/src/main/publisher/site/themes/wso2/templates/item-implement/js/api-implementation.js +++ b/components/jaggery-apps/publisher/src/main/publisher/site/themes/wso2/templates/item-implement/js/api-implementation.js @@ -118,7 +118,7 @@ $(document).ready(function(){ $('#'+thisID).buttonLoader('stop'); $( "body" ).trigger( "api_saved" ); if(!$("#hiddenGoToManage").val()){ - $("#apiSaved").attr("style", "display: block ; position: fixed; height: 50px; width: 90% ; top: 20px; left: 5%; padding: 0px; list-style-type: none; z-index:999999999; text-align: center; padding-top : 15px"); + $('#apiSaved').show(); } setTimeout("hideMsg()", 3000); } else { diff --git a/components/jaggery-apps/publisher/src/main/publisher/site/themes/wso2/templates/item-manage/template.jag b/components/jaggery-apps/publisher/src/main/publisher/site/themes/wso2/templates/item-manage/template.jag index c30eb9fcd..09ffe4d54 100644 --- a/components/jaggery-apps/publisher/src/main/publisher/site/themes/wso2/templates/item-manage/template.jag +++ b/components/jaggery-apps/publisher/src/main/publisher/site/themes/wso2/templates/item-manage/template.jag @@ -1473,7 +1473,7 @@ $('#sandboxTps').val(null); } thisID=$(this).attr('id'); - $("#apiSaved").attr("style", "display: block ; position: fixed; height: 50px; width: 90% ; top: 20px; left: 5%; padding: 0px; list-style-type: none; z-index:999999999; text-align: center; padding-top : 15px"); + $('#apiSaved').show(); setTimeout("hideMsg()", 3000); }); diff --git a/components/jaggery-apps/publisher/src/main/publisher/site/themes/wso2/templates/listing/template.jag b/components/jaggery-apps/publisher/src/main/publisher/site/themes/wso2/templates/listing/template.jag index 607917e71..069a4504a 100644 --- a/components/jaggery-apps/publisher/src/main/publisher/site/themes/wso2/templates/listing/template.jag +++ b/components/jaggery-apps/publisher/src/main/publisher/site/themes/wso2/templates/listing/template.jag @@ -1,7 +1,7 @@ <% jagg.template("listing", function(inputs, outputs, jagg) { %> -
- + @@ -456,7 +475,7 @@ if (<%=isEnabledTutorialForThisTenant%>) {
- - - -

- - - - - - - - - -

- - - - - - - -<% } %> -<% }); %> - - +<% jagg.template("sso/filter", function(inputs, outputs, jagg) { %> +<% + var site = require("/site/conf/site.json"); + var security =require("sso"); + + var ssoRelyingParty = new security.SSORelyingParty(site.ssoConfiguration.issuer); + var sessionId = session.getId(); + var isAuthenticated = ssoRelyingParty.isSessionAuthenticated(sessionId); + + var requestURI; + + var isPassiveAuthRequired = false; + var samlAuthRequest; + + var requestedPage = request.getParameter("requestedPage"); + var passiveAuthRequired = request.getParameter("passiveAuthRequired"); + if (requestedPage != null) { + requestURI = requestedPage; + } else { + requestURI = request.getRequestURI(); + if (request.getQueryString() != null) { + requestURI =requestURI + '?' + request.getQueryString(); + } + } + var checkSSO = true; + + if (requestURI.indexOf("register.jag") != -1) { + checkSSO = false; + } else if(requestURI.indexOf("confirmemail.jag") != -1) { + checkSSO = false; + } else if (passiveAuthRequired != null && 'false' == passiveAuthRequired) { + isPassiveAuthRequired = false; + } else if ((requestURI == site.context+'/') || requestURI.indexOf(site.context+'/?tenant=') != -1 || requestURI.indexOf("list-apis.jag") != -1 || requestURI.indexOf("apis/info") != -1 || requestURI.indexOf("apis/list") != -1) { + isPassiveAuthRequired = true; + } + + var security = require("sso"); + var site = require("/site/conf/site.json"); + var api = jagg.module("api"); + var ssoRelyingParty = new security.SSORelyingParty(site.ssoConfiguration.issuer); + var errorAuthorizationURL = "/site/pages/error-pages/401.html"; + var isUserPermitted = null; + if (ssoRelyingParty.getLoggedInUser(sessionId) != null) { + isUserPermitted = api.hasUserPermissions(ssoRelyingParty.getLoggedInUser(sessionId)); + } + if(!isPassiveAuthRequired) { + if(Boolean(isAuthenticated) && !Boolean(isUserPermitted.permitted)) { + response.sendRedirect(jagg.getAbsoluteUrl(errorAuthorizationURL)); + } + } + + if (checkSSO && !Boolean(isAuthenticated)) { + + var keyStorePassword = site.ssoConfiguration.keyStorePassword; + var acsURL = site.ssoConfiguration.acsURL; + var keyStoreAlias = site.ssoConfiguration.identityAlias; + var keyStoreLocation = site.ssoConfiguration.keyStoreName; + var signRequests = site.ssoConfiguration.signRequests; + var CarbonUtils = Packages.org.wso2.carbon.utils.CarbonUtils; + if (site.ssoConfiguration.keyStorePassword == null || site.ssoConfiguration.keyStorePassword == "") { + site.ssoConfiguration.keyStorePassword = CarbonUtils.getServerConfiguration().getFirstProperty("Security.KeyStore.Password"); + } + if (site.ssoConfiguration.identityAlias == null || site.ssoConfiguration.identityAlias == "") { + site.ssoConfiguration.identityAlias = CarbonUtils.getServerConfiguration().getFirstProperty("Security.KeyStore.KeyAlias"); + } + if (site.ssoConfiguration.keyStoreName == null || site.ssoConfiguration.keyStoreName == "") { + site.ssoConfiguration.keyStoreName = CarbonUtils.getServerConfiguration().getFirstProperty("Security.KeyStore.Location"); + } + if (site.ssoConfiguration.signRequests == null || site.ssoConfiguration.signRequests == "") { + site.ssoConfiguration.signRequests = "false"; + } + if (site.ssoConfiguration.nameIdPolicy == null){ + site.ssoConfiguration.nameIdPolicy = ""; + } + + ssoRelyingParty.setProperty("identityProviderURL", site.ssoConfiguration.identityProviderURL); + ssoRelyingParty.setProperty("keyStorePassword", String(site.ssoConfiguration.keyStorePassword)); + ssoRelyingParty.setProperty("identityAlias", String(site.ssoConfiguration.identityAlias)); + ssoRelyingParty.setProperty("keyStoreName", String(site.ssoConfiguration.keyStoreName)); + ssoRelyingParty.setProperty("signRequests", String(site.ssoConfiguration.signRequests)); + ssoRelyingParty.setProperty("nameIdPolicy", site.ssoConfiguration.nameIdPolicy); + ssoRelyingParty.setProperty("assertionEncryptionEnabled", site.ssoConfiguration.assertionEncryptionEnabled); + + // if it is IDP initiated SSO, we should just do a HTTP GET to IDP with SP ID and relay state optionally + if (site.ssoConfiguration.idpInit == "true") { + var relayState = ssoRelyingParty.getUUID(); + ssoRelyingParty.setRelayStateProperty(relayState, requestURI); + response.sendRedirect(site.ssoConfiguration.idpInitSSOURL+"&RelayState="+ relayState); + return; + } + + var consumerUrl = ""; + //if acsURL is provided in site.json, consumerUrl will be taken from that. Otherwise generated from the app. + if (acsURL) { + consumerUrl = acsURL; + } else { + consumerUrl = jagg.getAbsoluteUrl("/jagg/jaggery_acs.jag"); + } + if (site.ssoConfiguration.passive == "true") { + samlAuthRequest = ssoRelyingParty.getSAMLAuthRequest(consumerUrl, isPassiveAuthRequired); + } else { + if (site.ssoConfiguration.signRequests == "true" && (site.reverseProxy.enabled == "auto")) { + samlAuthRequest = ssoRelyingParty.getSAMLAuthRequest(consumerUrl); + } else { + samlAuthRequest = ssoRelyingParty.getSAMLAuthRequest(); + } + } + + var encodedRequest = ssoRelyingParty.encode(samlAuthRequest); + var relayState = ssoRelyingParty.getUUID(); + ssoRelyingParty.setRelayStateProperty(relayState, requestURI); + var idpURL = ssoRelyingParty.getProperty("identityProviderURL"); +%> +
+ +

<%=i18n.localize("You are now redirected to Identity. If the redirection fails, please click the POST button.")%>

+ +
+ +

+ + + + + + + + + +

+ +
+ +
+ + + +<% } %> +<% }); %> + + diff --git a/components/jaggery-apps/store/src/main/store/site/themes/wso2/templates/sso/logout/template.jag b/components/jaggery-apps/store/src/main/store/site/themes/wso2/templates/sso/logout/template.jag index c12026fef..f89f9f362 100644 --- a/components/jaggery-apps/store/src/main/store/site/themes/wso2/templates/sso/logout/template.jag +++ b/components/jaggery-apps/store/src/main/store/site/themes/wso2/templates/sso/logout/template.jag @@ -67,39 +67,10 @@ %>
-
- - -