Skip to content

Commit

Permalink
CB-5695. Fixed npe when RP turned on, but not configured (#3077)
Browse files Browse the repository at this point in the history
* CB-5695. Fixed npe when RP turned on, but not configured

* CB-5695. Fixed checkstyle

---------

Co-authored-by: Evgenia <[email protected]>
  • Loading branch information
DenisSinelnikov and EvgeniaBzzz authored Nov 21, 2024
1 parent e56a298 commit b816a6d
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,13 @@ public void reverseProxyAuthentication(@NotNull HttpServletRequest request, @Not
String firstName = request.getHeader(resolveParam(paramConfigMap.get(RPConstants.PARAM_FIRST_NAME), RPAuthProvider.X_FIRST_NAME));
String lastName = request.getHeader(resolveParam(paramConfigMap.get(RPConstants.PARAM_LAST_NAME), RPAuthProvider.X_LAST_NAME));
String fullName = request.getHeader(resolveParam(paramConfigMap.get(RPConstants.PARAM_FULL_NAME), RPAuthProvider.X_FULL_NAME));
String logoutUrl = Objects.requireNonNull(configuration).getParameter(RPConstants.PARAM_LOGOUT_URL);
String teamDelimiter = resolveParam(JSONUtils.getString(configuration.getParameters(),
RPConstants.PARAM_TEAM_DELIMITER), "\\|");
String logoutUrl = null;
String teamDelimiter = DEFAULT_TEAM_DELIMITER;
if (configuration != null) {
logoutUrl = configuration.getParameter(RPConstants.PARAM_LOGOUT_URL);
teamDelimiter = resolveParam(JSONUtils.getString(configuration.getParameters(),
RPConstants.PARAM_TEAM_DELIMITER), DEFAULT_TEAM_DELIMITER);
}
List<String> userTeams = teams == null ? null : (teams.isEmpty() ? List.of() : List.of(teams.split(teamDelimiter)));
if (userName != null) {
try {
Expand Down

0 comments on commit b816a6d

Please sign in to comment.