2013-10-17 58 views
0

我需要在認證嘗試後加入一點額外的邏輯(記錄IP和結果到數據庫中,稍後用於檢測強力攻擊)。在Grails中將自定義後驗證邏輯放在哪裏?

我讀Intercepting Spring security in grails to get some request parameters但該方法只允許處理程序成功驗證,因爲這是org.codehaus.groovy.grails.plugins.springsecurity.AjaxAwareAuthenticationSuccessHandler定義onAuthenticationSuccess()。我需要兩個。

我對Grails及其安全性插件相當陌生,所以雖然我確信這是可能的,但我不確定哪個地方最好。過濾器?服務(然後哪一個?)?控制器?

預先感謝您。

環境:Grails的2.3,Spring Security的插件1.2.7.3

回答

相關問題