spring security认证出错,求解答下该怎么办
@Override
public Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response) throws AuthenticationException {
try {
LoginUser loginUser = new ObjectMapper().readValue(request.getInputStream(), LoginUser.class);
return authenticationManager.authenticate(new UsernamePasswordAuthenticationToken(loginUser.getUsername(), loginUser.getPassword(), new ArrayList<>()));
// return authenticationManager.authenticate(new UsernamePasswordAuthenticationToken(InputUserCache.username, InputUserCache.password, new ArrayList<>()));
} catch (Exception e) {
throw new RuntimeException(e);
}
}