security登录的拦截器为 UsernamePasswordAuthenticationFilter ,其中这里默认登录访问接口为/login,且为post请求方式
, attemptAuthentication ( ) 这个方法就是认证方法,最终会将客户端传来的username 和 password 封装成,UsernamePasswordAuthenticationToken 对象,该对象本质也是Authentication对象,
因为UsernamePasswordAuthenticationToken继承了AbstractAuthenticationToken,而AbstractAuthenticationToken实现了Authentication
在UsernamePasswordAuthenticationFilter this.getAuthenticationManager().authenticate(authRequest);