Remove redundant token check
@@ -30,8 +30,6 @@ public class BasicHeaderApiTokenAuthenticator extends BasicHeaderAuthenticator {
public Authentication authenticate(HttpServletRequest req, HttpServletResponse rsp, String username, String password) throws ServletException {
User u = BasicApiTokenHelper.isConnectingUsingApiToken(username, password);
if(u != null) {
- ApiTokenProperty t = u.getProperty(ApiTokenProperty.class);
- if (t != null && t.matchesPassword(password)) {
Authentication auth;
try {
UserDetails userDetails = u.getUserDetailsForImpersonation();
@@ -50,7 +48,6 @@ public class BasicHeaderApiTokenAuthenticator extends BasicHeaderAuthenticator {
req.setAttribute(BasicHeaderApiTokenAuthenticator.class.getName(), true);
return auth;
}
- }
return null;
}
