[英]Grails Spring Security plugin url
The Grails Spring Security plugin docs shows these two properties related to logout urls (copied from https://github.com/grails-plugins/grails-spring-security-core/blob/master/src/docs/guide/13%20URL%20Properties.gdoc ) Grails Spring Security插件文档显示了这两个与注销URL相关的属性(复制自https://github.com/grails-plugins/grails-spring-security-core/blob/master/src/docs/guide/13%20URL %20Properties.gdoc )
logout.afterLogoutUrl | '/' | URL for redirect after logout.
logout.filterProcessesUrl | '/j_spring_security_logout' | Logout URL, intercepted by Spring Security filter.
When I run the s2-quickstart script to generate the LogoutController
, the default behavior is to redirect to logout.filterProcessesUrl
. 当我运行s2-quickstart脚本来生成
LogoutController
,默认行为是重定向到logout.filterProcessesUrl
。
What is the purpose of logout.afterLogoutUrl
if the LogoutController
does not redirect to it? 如果
LogoutController
没有重定向到它, logout.afterLogoutUrl
的目的是什么?
Spring Security introduces some filters, Java filters , not Grails. Spring Security引入了一些过滤器, Java过滤器 ,而不是Grails。 This filters do all authentication job, see http://static.springsource.org/spring-security/site/docs/3.1.x/reference/security-filter-chain.html
此过滤器执行所有身份验证工作,请参阅http://static.springsource.org/spring-security/site/docs/3.1.x/reference/security-filter-chain.html
logout.filterProcessesUrl
handled by Spring Security filter, and after cleanup (removes user from current context, etc) it redirects to logout.afterLogoutUrl
. logout.filterProcessesUrl
由Spring Security过滤器处理,并在清理(从当前上下文中删除用户等)后重定向到logout.afterLogoutUrl
。
LogoutController
does nothing, just redirects to filter. LogoutController
什么都不做,只是重定向到过滤器。 You can redirect user to this user in your own controller, or even put <a
link to such url 您可以在自己的控制器中将用户重定向到此用户,甚至可以将
<a
链接指向此类URL
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.