I am using Spring security rest plugin to authenticate the user. In this, there is a class named RestAuthenticationFilter
. Now I want to call the methods of some custom class say CustomRestAuthenticationFilter
(which extends RestAuthenticationFilter
) instead of RestAuthenticationFilter
. How to do this?
Is there any way that we define in resources.groovy
or somewhere else that to use CustomRestAuthenticationFilter
instead of RestAuthenticationFilter
?
答案 0 :(得分:0)
我相信在文档中很好地描述了过滤!
https://grails-plugins.github.io/grails-spring-security-core/guide/filters.html
只需修改grails.plugin.springsecurity.filterChain.filterNames
文件中的Config.groovy
值,使其包含RestAuthenticationFilter
代替RestAuthenticationFilter
,您就应该好了。