[ 
https://issues.apache.org/jira/browse/KNOX-2972?focusedWorklogId=886415&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-886415
 ]

ASF GitHub Bot logged work on KNOX-2972:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 20/Oct/23 13:54
            Start Date: 20/Oct/23 13:54
    Worklog Time Spent: 10m 
      Work Description: zeroflag commented on code in PR #808:
URL: https://github.com/apache/knox/pull/808#discussion_r1367009273


##########
gateway-service-session/src/main/java/org/apache/knox/gateway/service/session/SessionResource.java:
##########
@@ -66,15 +73,23 @@ public SessionInformation getSessionInformation() {
   }
 
   private String getBaseGatewayUrl(GatewayConfig config) {
-    return request.getRequestURL().substring(0,
-        request.getRequestURL().length() - request.getRequestURI().length()) +
-        "/" + config.getGatewayPath();
+    return request.getRequestURL().substring(0, 
request.getRequestURL().length() - request.getRequestURI().length()) + "/" + 
config.getGatewayPath();
   }
 
-  private String getLogoutPageUrl(GatewayConfig config) {
-    return getBaseGatewayUrl(config) +
-        "/knoxsso/knoxauth/logout.jsp?originalUrl=" + 
getBaseGatewayUrl(config) +
-        "/homepage/home";
+  private String getLogoutPageUrl(GatewayConfig config, String 
logoutPageProfile, String logoutPageTopologies) {
+    if (baseLogoutPageUrl == null) {
+      baseLogoutPageUrl = getBaseGatewayUrl(config) + 
"/knoxsso/knoxauth/logout.jsp?originalUrl=" + getBaseGatewayUrl(config) + 
"/homepage/home";

Review Comment:
   Is the `knoxsso` part of the URL always fixed, or topology dependent?





Issue Time Tracking
-------------------

    Worklog Id:     (was: 886415)
    Time Spent: 20m  (was: 10m)

> Logout page URL may take query parameters
> -----------------------------------------
>
>                 Key: KNOX-2972
>                 URL: https://issues.apache.org/jira/browse/KNOX-2972
>             Project: Apache Knox
>          Issue Type: Improvement
>          Components: Homepage
>            Reporter: Sandor Molnar
>            Assignee: Sandor Molnar
>            Priority: Major
>             Fix For: 2.1.0
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Currently, the logout page URL contains a hard-coded {{originalUrl}} that 
> points to the Knox Home page without any {{profile}} or {{topologies}} query 
> parameter. In some cases, it would be beneficial to pass any of those params 
> when logging out from the application.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to