Spring Security 学习笔记-securityContext过滤器
2024-08-29 00:52:53
位于过滤器顶端,第一个起作用的过滤器。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没有提交前。
最新文章
- 浅谈 jQuery 事件源码定位问题
- apache开启.htaccess及.htaccess的使用方法(转)
- android 获取系统联系人 完全解析
- centos linux安全和调优 第四十一节课
- mysql学习之-三种安装方式与版本介绍
- 201509020-js
- 【众秒之门 JavaScript与jQuery技术精粹 #BOOK#】第1章 初学JavaScript需知的七件事
- JavaScript设计模式之工厂模式
- [转]SGI STL 红黑树(Red-Black Tree)源代码分析
- poj 1279 半平面交核面积
- [其它]iOS 12.2支持电信VoLTE了,中国电信教你如何开通:只要三步
- Python爬虫【实战篇】bilibili视频弹幕提取
- 为input标签绑定事件的几种方式
- Python学习笔记,day1
- jQ not()选择器 与 css3 :not( selector )选择器
- web scraper——简单的爬取数据【二】
- 二、linux IO 编程---系统调用和POSIX标准和标准IO
- spring cloud+.net core搭建微服务架构:服务发现(二)
- SpringBoot之oauth2.0学习之服务端配置快速上手
- hashCode会出现负数吗,答案是肯定的
热门文章
- 软件测试 → 第一章 基础->; 软件与软件危机
- jmeter使用Badboy录制、检查点和参数化
- python 别名
- Leetcode744.Find Smallest Letter Greater Than Target寻找比目标字母大的最小字母
- SQL Server 记录(更新中...)
- Selenium-----wait的三种等待
- python中Sting字符串
- LeetCode21 Merge Two Sorted Lists
- 通过iOS 9 SFSafariViewController提供完整的Web浏览体验
- H5+ 分享到微信、朋友圈代码示例