[英]In Spring-Security what exactly is the j_spring_security_logout? Ive heard it referred to as “handler” but I'm not sure what that means
我一直在學習spring和spring-security,並且在spring安全上下文中遇到了標簽的auto-config =“true”屬性。 我被介紹給j_spring_security_logout作為提交以在jsp中注銷功能的url。
在jsp中使用如下:
<a href="../j_spring_security_logout">logout buddy</a></p>
<a href="../j_spring_security_login">login</a></p>
Spring提供的這個j_spring_security_logout(魔法)究竟是什么? 我聽說它被稱為處理程序。 但我不知道這意味着什么。
先感謝您。
當瀏覽器最初發送對/j_spring_security_logout
的請求時,它會轉到org/springframework/security/web/authentication/logout/LogoutFilter
,然后將注銷任務委派給org/springframework/security/web/authentication/logout/LogoutHandler
實現
org/springframework/security/web/authentication/logout/SecurityContextLogoutHandler
是LogoutHandler
一個實現,它有一個方法logout(HttpServletRequest request, HttpServletResponse response, Authentication authentication)
,它將由LogoutFilter
。
LogoutHandler
主要做兩件事;
SecurityContextHolder
。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.