Spring Security的执行流程如下
时间: 2024-02-22 14:24:43 浏览: 29
Spring Security的执行流程如下:
1. 当用户发送请求时,Spring Security会首先检查用户是否已经经过认证。如果用户未经过认证,则会将用户重定向到登录页面。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* *3* [springsecurity工作流程](https://blog.csdn.net/qq_39321234/article/details/130414369)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 100%"]
[ .reference_list ]
相关问题
spring security执行流程
Spring Security执行流程如下:
1. 用户请求访问受保护的资源。
2. Spring Security拦截请求,检查用户是否已经登录。
3. 如果用户已经登录,Spring Security检查用户是否有访问该资源的权限。
4. 如果用户没有访问该资源的权限,Spring Security将用户重定向到一个错误页面或者返回一个错误信息。
5. 如果用户没有登录,Spring Security将用户重定向到登录页面。
6. 用户输入用户名和密码进行登录。
7. Spring Security验证用户名和密码是否正确。
8. 如果用户名和密码正确,Spring Security创建一个安全上下文,并将用户信息存储在该上下文中。
9. Spring Security将用户重定向到之前请求的受保护资源。
10. 用户可以访问受保护的资源。
springsecurity执行流程
Spring Security 的执行流程大致如下:
1. 用户请求访问受保护的资源
2. Spring Security 拦截该请求,根据配置的认证和授权策略进行身份验证和授权。
3. 身份验证通过后,根据配置的安全策略对请求进行过滤,以确保请求的安全性。
4. 如果请求通过安全过滤,则允许请求访问受保护的资源。
5. 如果请求未通过安全过滤,则拒绝访问并可能返回错误信息。
希望对您有所帮助!
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![-](https://csdnimg.cn/download_wenku/file_type_column_c1.png)
![-](https://csdnimg.cn/download_wenku/file_type_column_c1.png)
![-](https://csdnimg.cn/download_wenku/file_type_column_c1.png)
![-](https://csdnimg.cn/download_wenku/file_type_column_c1.png)
![-](https://csdnimg.cn/download_wenku/file_type_column_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)