Skip to content
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.

Commit

Permalink
Set non-null principal if header is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
jillurquddus committed Apr 6, 2023
1 parent e3fd27d commit 1dcb371
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ public AuthenticationFilter(String principalRequestHeader) {

@Override
protected Object getPreAuthenticatedPrincipal(HttpServletRequest request) {
return request.getHeader(principalRequestHeader);
return request.getHeader(principalRequestHeader) != null ?
request.getHeader(principalRequestHeader) : "";
}

@Override
Expand Down

0 comments on commit 1dcb371

Please sign in to comment.