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原理的更多相关文章

  1. spring security 原理+实战

    疯狂创客圈 Java 高并发[ 亿级流量聊天室实战]实战系列 [博客园总入口 ] 架构师成长+面试必备之 高并发基础书籍 [Netty Zookeeper Redis 高并发实战 ] 前言 Crazy ...

  2. Spring Security原理分析:系列集合

    Spring Security 工作原理概览:https://blog.csdn.net/u012702547/article/details/89629415 spring security执行原理 ...

  3. Spring Security原理与应用

    Spring Security是什么 Spring Security是一个能够为基于Spring的企业应用系统提供声明式的安全访问控制解决方案的安全框架.它提供了一组可以在Spring应用上下文中配置 ...

  4. spring security原理-学习笔记1-整体概览

    整体概述 运行时环境 Spring Security 3.0需要Java 5.0 Runtime Environment或更高版本. 核心组件 SecurityContextHolder,Securi ...

  5. spring security原理-学习笔记2-核心组件

    核心组件 AuthenticationManager,ProviderManager和AuthenticationProvider AuthenticationManager只是一个接口,实际中是如何 ...

  6. Spring Security原理篇(一) 启动原理

    1.概述 spring security有参考的中文翻译文档https://springcloud.cc/spring-security-zhcn.html 在学习spring security的时候 ...

  7. 214. Spring Security:概述

    前言 在之前介绍过了Shiro之后,有好多粉丝问SpringSecurity在Spring Boot中怎么集成.这个系列我们就和大家分享下有关这方面的知识. 本节大纲 一.什么是SpringSecur ...

  8. Spring Security编程模型

    1.采用spring进行权限控制 url权限控制 method权限控制 实现:aop或者拦截器(本质就是之前之后进行控制)--------------------proxy就是 2.权限模型: 本质理 ...

  9. Springboot --- Spring Security (一)

      文章部分图片来自参考资料 问题 : Spring Security 内部实现的原理是什么 概述 Spring Security 是个安全框架,可以提供认证,防止网络功能等功能,可以结合 sprin ...

随机推荐

  1. mfs挂载

    安装客户端,客户端安装见官网 记住mfs需要dns或者修改hosts文件,实现主机名和ip对应 在mfsmaster修改mfsexports.cfg 修改挂载参数,根须需要 10.0.67.0/24  ...

  2. 开源管理系统OSSIM设置 语言为中文简体

    最近研究OSSIM系统,OSSIM的安装是做好的ISO,操作系统选择的是CentOS 64Bit系统.我使用的OSSIM 4.11 的ISO安装,虽然系统说明支持中文,实际上,只是台湾的繁体中文而以. ...

  3. 基于Python3 + OpenCV3.3.1的远程监控程序

    基于Python3 + OpenCV3.3.1的远程监控程序 一.环境配置 OpenCV是一个基于(开源)发行的跨平台计算机视觉库,利用OpenCV能够实现视频图像的捕获. 关于python3中Ope ...

  4. 160. Intersection of Two Linked Lists【easy】

    160. Intersection of Two Linked Lists[easy] Write a program to find the node at which the intersecti ...

  5. spring boot中 使用http请求

    因为项目需求,需要两个系统之间进行通信,经过一番调研,决定使用http请求. 服务端没有什么好说的,本来就是使用web 页面进行访问的,所以spring boot启动后,controller层的接口就 ...

  6. ConcurrentHashMap的JDK1.8实现

    今天我们介绍一下ConcurrentHashMap在JDK1.8中的实现.基本结构 ConcurrentHashMap在1.8中的实现,相比于1.7的版本基本上全部都变掉了.首先,取消了Segment ...

  7. Eclipse开发C/C++之使用技巧小结,写给新手

    我需要在Linux下开发C++项目,没有VS,用Vim开发是不错,但项目大了,效率 就跟不上IDE了,所以选了Eclipse+CDT插件.当然,Vimers觉得我说的不对的请 勿喷哈,我也是水手一个. ...

  8. springboot解决第三方依赖jar包的问题

    公司现在用的是springboot+maven,想要把一些老的项目都改成这种框架.但是一些老的项目中有好多第三方的jar包或者是自己的jar包,maven库上没有.最初的解决方案是一个个的deploy ...

  9. IOS设计模式的六大设计原则之里氏替换原则(LSP,Liskov Substitution Principle)

    定义 里氏替换原则的定义有两种,据说是由麻省理工的一位姓里的女士所提出,因此以其名进行命名. 定义1:如果对一个类型为T1的对象o1,都有类型为T2的对象o2,使得以T1所定义的程序P中在o1全都替换 ...

  10. C#中4种深拷贝方法介绍

    1:利用反射实现 public static T DeepCopy<T>(T obj) {   //如果是字符串或值类型则直接返回   if (obj is string || obj.G ...