risdenk commented on a change in pull request #263: KNOX-2226 - Add home page
to Knox
URL: https://github.com/apache/knox/pull/263#discussion_r383916666
##########
File path:
gateway-provider-security-jwt/src/main/java/org/apache/knox/gateway/provider/federation/jwt/filter/SSOCookieFederationFilter.java
##########
@@ -93,6 +95,13 @@ public void init( FilterConfig filterConfig ) throws
ServletException {
// gateway path for deriving an idp url when missing
gatewayPath = filterConfig.getInitParameter(GATEWAY_PATH);
+ if (StringUtils.isBlank(gatewayPath)) {
+ final GatewayConfig gatewayConfig = filterConfig.getServletContext() ==
null ? null
+ : (GatewayConfig)
filterConfig.getServletContext().getAttribute(GatewayConfig.GATEWAY_CONFIG_ATTRIBUTE);
+ if (gatewayConfig != null) {
+ gatewayPath = gatewayConfig.getGatewayPath();
+ }
+ }
Review comment:
Do we need `StringUtils.isBlank`? Check is not null and is not empty? That
would remove the commons-lang3 dependency
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services