Java Code Examples for org.wso2.carbon.ui.CarbonUIUtil#getAdminConsoleURL()

The following examples show how to use org.wso2.carbon.ui.CarbonUIUtil#getAdminConsoleURL() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SSOAssertionConsumerService.java    From carbon-identity with Apache License 2.0 5 votes vote down vote up
/**
 * Get the admin console url from the request.
 *
 * @param request httpServletReq that hits the ACS Servlet
 * @return Admin Console URL       https://10.100.1.221:8443/acs/carbon/
 */
private String getAdminConsoleURL(HttpServletRequest request) {
    String url = CarbonUIUtil.getAdminConsoleURL(request);
    if (!url.endsWith("/")) {
        url = url + "/";
    }
    if (url.indexOf("/acs") != -1) {
        url = url.replace("/acs", "");
    }
    return url;
}
 
Example 2
Source File: OIDCAssertionConsumerService.java    From carbon-apimgt with Apache License 2.0 5 votes vote down vote up
/**
 * Get the admin console url from the request.
 *
 * @param request httpServletReq that hits the ACS Servlet
 * @return Admin Console URL       https://10.100.1.221:9443/oidcacs/carbon/
 */
private String getAdminConsoleURL(HttpServletRequest request) {
    String url = CarbonUIUtil.getAdminConsoleURL(request);
    if (!url.endsWith("/")) {
        url = url + "/";
    }
    if (url.contains("/oidcacs")) {
        url = url.replace("/oidcacs", "");
    }
    return url;
}