Spring Security认证 是否是从Authentication对象的属性去判断请求经过认证了?
我在以下代码中authenticationToken 构造参数全部设置为空,为什么拦截需要认证的请求 可以通过认证
UsernamePasswordAuthenticationToken authenticationToken =
new UsernamePasswordAuthenticationToken(null, null, null);
SecurityContextHolder.getContext().setAuthentication(authenticationToken);
filterChain.doFilter(request, response);
构造器进去点点,点进去你就知道了