Commit 72299da3 authored by LAVENIER's avatar LAVENIER
Browse files

[fix] AuthenticationFilter: when not ready, failed.

parent 79fe0912
......@@ -23,6 +23,7 @@ package net.sumaris.server.http.security;
*/
import org.apache.commons.lang3.StringUtils;
import org.springframework.security.authentication.AuthenticationServiceException;
import org.springframework.security.authentication.BadCredentialsException;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.Authentication;
......@@ -76,7 +77,7 @@ public class AuthenticationFilter extends AbstractAuthenticationProcessingFilter
// When not ready, always auth as anonymous
if (!this.ready) {
return null;
throw new AuthenticationServiceException("Cannot authenticate: not ready");
}
String authorization = request.getHeader(AUTHORIZATION);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment