Skip to content

Commit

Permalink
IM-457 Clean code in WebSecurityConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
kristinaBc3 committed Dec 12, 2024
1 parent ac7c89b commit 765c9d8
Showing 1 changed file with 1 addition and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,21 +71,12 @@ AuthoritiesConverter realmRolesAuthoritiesConverter() {

HttpServletRequest request = EngineHttpUtils.getCurrentHttpRequest();

Map<String, String> headers = Collections.list(request.getHeaderNames())
.stream()
.collect(Collectors.toMap(h -> h, request::getHeader));

logger.info(headers.toString().replace(',', '\n'));


String klabAuth = request.getHeader(KlabHttpHeaders.KLAB_AUTHORIZATION);

logger.info(klabAuth);

if (klabAuth != null) {
// send anything already known downstream
if (Authentication.INSTANCE.getIdentity(klabAuth, IIdentity.class) != null) {
logger.info("Add ROLE_SESSION");
logger.trace("Add ROLE_SESSION");
roles.ifPresent(role -> role.add(Roles.SESSION));
}
}
Expand Down

0 comments on commit 765c9d8

Please sign in to comment.