smolnar82 commented on code in PR #1264:
URL: https://github.com/apache/knox/pull/1264#discussion_r3414285148
##########
gateway-service-knoxsso/src/main/java/org/apache/knox/gateway/service/knoxsso/WebSSOResource.java:
##########
@@ -224,6 +228,8 @@ private void handleCookieSetup() {
}
final String configuredTokenType =
context.getInitParameter(SSO_COOKIE_TOKEN_TYPE_PARAM);
tokenType = StringUtils.isBlank(configuredTokenType) ?
JOSEObjectType.JWT.getType() : configuredTokenType;
+
+ includeGroups =
Boolean.parseBoolean(context.getInitParameter(SSO_COOKIE_INCLUDE_GROUPS_PARAM));
Review Comment:
It's a primitive `boolean` type field -> defaults to `false`.
The above line also defaults to false: if not `knoxsso.token.include.groups`
declared -> the `context.getInitParameter()` will return `null` ->
`Boolean.parseBoolean()` will return `FALSE` -> unboxed to `false`.
I added unit tests as well as tested this scenario manually (seePR
description).
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]