位于过滤器顶端,第一个起作用的过滤器。SecurityContextPersistenceFilter

在执行其他过滤器之前,率先判断用户的session中是否已经存在一个SecurityContext了。如果存在,就把SecurityContext拿出来,放到SecurityContextHolder中,供Spring Security的其他部分使用。如果不存在,就创建一个SecurityContext出来,还是放到SecurityContextHolder中,供Spring Security的其他部分使用。

过滤链执行完成后如果session尚未保存SecurityContext,则repo.saveContext(contextAfterChainExecution, holder.getRequest(), holder.getResponse());方法调用SaveContextOnUpdateOrErrorResponseWrapper类中的responseWrapper.saveContext(context)进行保存。这个保存可能是response没有提交前。

最新文章

  1. 浅谈 jQuery 事件源码定位问题
  2. apache开启.htaccess及.htaccess的使用方法(转)
  3. android 获取系统联系人 完全解析
  4. centos linux安全和调优 第四十一节课
  5. mysql学习之-三种安装方式与版本介绍
  6. 201509020-js
  7. 【众秒之门 JavaScript与jQuery技术精粹 #BOOK#】第1章 初学JavaScript需知的七件事
  8. JavaScript设计模式之工厂模式
  9. [转]SGI STL 红黑树(Red-Black Tree)源代码分析
  10. poj 1279 半平面交核面积
  11. [其它]iOS 12.2支持电信VoLTE了,中国电信教你如何开通:只要三步
  12. Python爬虫【实战篇】bilibili视频弹幕提取
  13. 为input标签绑定事件的几种方式
  14. Python学习笔记,day1
  15. jQ not()选择器 与 css3 :not( selector )选择器
  16. web scraper——简单的爬取数据【二】
  17. 二、linux IO 编程---系统调用和POSIX标准和标准IO
  18. spring cloud+.net core搭建微服务架构:服务发现(二)
  19. SpringBoot之oauth2.0学习之服务端配置快速上手
  20. hashCode会出现负数吗,答案是肯定的

热门文章

  1. 软件测试 → 第一章 基础-> 软件与软件危机
  2. jmeter使用Badboy录制、检查点和参数化
  3. python 别名
  4. Leetcode744.Find Smallest Letter Greater Than Target寻找比目标字母大的最小字母
  5. SQL Server 记录(更新中...)
  6. Selenium-----wait的三种等待
  7. python中Sting字符串
  8. LeetCode21 Merge Two Sorted Lists
  9. 通过iOS 9 SFSafariViewController提供完整的Web浏览体验
  10. H5+ 分享到微信、朋友圈代码示例