简体   繁体   English

Grails修改Spring Security插件

[英]Grails modify Spring Security plugin

I have web application ( built using Grails ) in which I am using Spring Security with LDAP. 我有使用LDAP的Spring Security的Web应用程序(使用Grails构建)。

Login and logout behaviour works fine in application. 登录和注销行为在应用程序中工作正常。

Now, I wanted to build the functionality where if admin is logged in application first time forward user to specific page instead of sending user to index/home page. 现在,我想构建一个功能,在该功能中,如果管理员首次登录应用程序,则将用户转发到特定页面,而不是将用户发送到索引/主页。

I modified LoginController ( auth method ) and tried to keep track of login by new domain class. 我修改了LoginController(auth方法),并尝试通过新的域类跟踪登录。 But after login Login controller "auth method" is not called. 但是登录后,不会调用登录控制器“ auth method”。

can anyone point me to right direction ? 谁能指出我正确的方向? is there other controller I need to modify ? 我还需要修改其他控制器吗?

The default Spring Security login form POSTs to a special URL: /j_spring_security_check (the exact URL used can be changed through the apf.filterProcessesUrl configuration parameter) This POST request is handled by the Spring Security internals. 默认的Spring Security登录表单POST到一个特殊的URL: /j_spring_security_check (可以通过apf.filterProcessesUrl配置参数更改使用的确切URL)该POST请求由Spring Security内部处理。 To add custom login logic, you can implement your own AuthenticationSuccessHandler as described here . 要添加自定义登录逻辑,你可以实现自己的AuthenticationSuccessHandler描述这里

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM