SpringSecurity01(springSecurity执行流程02)
文章目录
web.xml里面配置的过滤器链:
1.当用户使用表单请求时,进入UsernamePasswordAuthenticationFilter,返回一个userDetailService的实例,
一般是从数据库中查询出来的实例,然后直接到最后一个FilterSecurityIntercepter,如果有错,则抛错给前面一个ExceptionTrasactionFilter进行抛错,如果没有错则放行,可以访问对应的资源
上面是总的执行流程,下面单独说一下UsernamePasswordAuthenticationFilter的认证流程
这个图应该都看得懂,和springSecurity里面的配置流程是一样的
AuthenticationProvider就相当于自定义的MyUserDetailService
评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论