spring security原理
spring security通过一系列过滤器实现其功能,入口过滤器如下(web.xml):
<filter>
<filter-name>springSecurityFilterChain</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
其他过滤器调用顺序:

然后通过org.springframework.security.web.FilterChainProxy过滤器获取以下过滤器列表:
org.springframework.security.web.context.SecurityContextPersistenceFilter@4976abb4
org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@3ea61bd9
org.springframework.security.web.authentication.logout.LogoutFilter@469ddd58
org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter@443b70fc
org.springframework.security.web.savedrequest.RequestCacheAwareFilter@386c58c4
org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@361af4c3
org.springframework.security.web.authentication.AnonymousAuthenticationFilter@1ec59845
org.springframework.security.web.session.SessionManagementFilter@1e6a7f1
org.springframework.security.web.access.ExceptionTranslationFilter@5b167571
org.springframework.security.web.access.intercept.FilterSecurityInterceptor@3a4b2e3c

然后由内部类 VirtualFilterChain 依次调用这些过滤器实现其认证、授权等功能 (org.springframework.security.web.FilterChainProxy$VirtualFilterChain)
细节可参考某大牛的文章:
http://dead-knight.iteye.com/category/220917
spring security原理的更多相关文章
- spring security 原理+实战
疯狂创客圈 Java 高并发[ 亿级流量聊天室实战]实战系列 [博客园总入口 ] 架构师成长+面试必备之 高并发基础书籍 [Netty Zookeeper Redis 高并发实战 ] 前言 Crazy ...
- Spring Security原理分析:系列集合
Spring Security 工作原理概览:https://blog.csdn.net/u012702547/article/details/89629415 spring security执行原理 ...
- Spring Security原理与应用
Spring Security是什么 Spring Security是一个能够为基于Spring的企业应用系统提供声明式的安全访问控制解决方案的安全框架.它提供了一组可以在Spring应用上下文中配置 ...
- spring security原理-学习笔记1-整体概览
整体概述 运行时环境 Spring Security 3.0需要Java 5.0 Runtime Environment或更高版本. 核心组件 SecurityContextHolder,Securi ...
- spring security原理-学习笔记2-核心组件
核心组件 AuthenticationManager,ProviderManager和AuthenticationProvider AuthenticationManager只是一个接口,实际中是如何 ...
- Spring Security原理篇(一) 启动原理
1.概述 spring security有参考的中文翻译文档https://springcloud.cc/spring-security-zhcn.html 在学习spring security的时候 ...
- 214. Spring Security:概述
前言 在之前介绍过了Shiro之后,有好多粉丝问SpringSecurity在Spring Boot中怎么集成.这个系列我们就和大家分享下有关这方面的知识. 本节大纲 一.什么是SpringSecur ...
- Spring Security编程模型
1.采用spring进行权限控制 url权限控制 method权限控制 实现:aop或者拦截器(本质就是之前之后进行控制)--------------------proxy就是 2.权限模型: 本质理 ...
- Springboot --- Spring Security (一)
文章部分图片来自参考资料 问题 : Spring Security 内部实现的原理是什么 概述 Spring Security 是个安全框架,可以提供认证,防止网络功能等功能,可以结合 sprin ...
随机推荐
- prototype 用法
prototype使得js面向对象使用了prototype之后,使用它里面的属性或者函数 需要new出一个对象才可以使用.否则不使用prototype,直接向对象注入 function Person( ...
- MATLAB 的数据类型
在MATLAB中有15种基本的数据类型: 8种整型数据类型.单精度浮点型(float).双精度浮点型(double).逻辑型(logical).字符串型(char).单元数组型(cell).结构体类型 ...
- 10、驱动中的阻塞与非阻塞IO
阻塞,就是在获取资源的时候,不能获取到,那么就会将当前的进程挂起(睡眠,也就是将当前进程从调度器拿走了,不会调度当前进程),直到满足条件为止再进行操作.相反,非阻塞,就是即使不能获取到资源,非 ...
- 工作总结 input 限制字数 textarea限制字数
最大能输入50个字 复制粘贴也不行 <textarea maxlength="50" class=" smallarea" cols="60& ...
- Mac OS X 控制键符号
- osx升级到10.10后,用pod install报错终于解决的方法
先依照这个文章做:http://blog.csdn.net/dqjyong/article/details/37958067 大概过程例如以下: Open Xcode 6 Open Preferenc ...
- Spring/SpringMVC在启动完成后执行方法
在某些情况下,有可能你会有这种需求:在Spring/SpringMVC项目中,当Spring/SpringMVC启动完成后,你需要执行一个方法来完成某些事件(比如创建网站地图,比如从订阅Redis服务 ...
- 小米Note全网通支持7模19频:先发标准版
2015-06-26 16:42:53 17749 次阅读 9 次推荐 稿源:安卓中国 43 条评论 感谢安卓中国的投递 自古一入电信深似海,从此手机没法买.现在首台全网通小米手机即将诞生.6 月 2 ...
- linux 免密登录
ssh-keygen -t rsa -P "" ssh-copy-id -i ~/.ssh/id_rsa.pub root@服务器地址
- php对gzip文件或者字符串解压实例参考
要采集一个网站,目标站采用了gzip压缩传输网页,本来应该只要发送一个http头 Accept-Encoding: identity或者干脆不发送这个头等,就可以使目标站返回没有经过gzip压缩的页面 ...