Skip to content

Commit 9eae653

Browse files
committed
Fix error with multiple authentication interceptors.
1 parent 81a1f69 commit 9eae653

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

phylodb/src/main/java/pt/ist/meic/phylodb/security/authentication/AuthenticationInterceptor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public AuthenticationInterceptor(UserService userService, String provider) {
4747
public boolean handle(HttpServletRequest req, HttpServletResponse res, Object handler) {
4848
String auth = req.getHeader(HttpHeaders.AUTHORIZATION);
4949
if (!provider.equals(req.getParameter(PROVIDER)))
50-
return !isLastHandler() || handleProblem(res, Problem.INVALID_REQUEST);
50+
return !isLastHandler() || req.getAttribute(PROVIDER) != null || handleProblem(res, Problem.INVALID_REQUEST);
5151
String[] authorization;
5252
if (auth == null || !(authorization = auth.split(" "))[0].equals(AUTHENTICATION_SCHEME))
5353
return handleProblem(res, Problem.INVALID_REQUEST);

0 commit comments

Comments
 (0)