spring_security自定义filter解决remember_me失效问题
一.最近项目要进行第三方登陆,由于项目用到了spring_security对于登陆方面需要自己重写 filter.
org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter
**二**.自己重写了这个filter,根据自己的业务需求去重写
public Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response) throws AuthenticationException
**三**.需要将**auto-config**设为**false**,因为你不能再靠spring_security来进行filter拦截了,将自己重写**loginfilter**,替换**FORM_LOGIN_FILTER**
1.在auto-config为**true,未自定义filter**时,下列用法是可行的.
<remember-me key="123456" token-validity-seconds="1209600"/>
**四**,解决remeber失效问题,如下操作.配置remeberservice,以及remember.provider.
五,最重要的就是,记得注入.自定义的loginfilter中,以及authentication-manager中.

如果有疑问,可以联系本人QQ1286814049