Skip to content

Commit

Permalink
Fix error with multiple authentication interceptors.
Browse files Browse the repository at this point in the history
  • Loading branch information
aplf committed Nov 26, 2023
1 parent 81a1f69 commit 9eae653
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public AuthenticationInterceptor(UserService userService, String provider) {
public boolean handle(HttpServletRequest req, HttpServletResponse res, Object handler) {
String auth = req.getHeader(HttpHeaders.AUTHORIZATION);
if (!provider.equals(req.getParameter(PROVIDER)))
return !isLastHandler() || handleProblem(res, Problem.INVALID_REQUEST);
return !isLastHandler() || req.getAttribute(PROVIDER) != null || handleProblem(res, Problem.INVALID_REQUEST);
String[] authorization;
if (auth == null || !(authorization = auth.split(" "))[0].equals(AUTHENTICATION_SCHEME))
return handleProblem(res, Problem.INVALID_REQUEST);
Expand Down

0 comments on commit 9eae653

Please sign in to comment.