CSRF Token

20 views
Skip to first unread message

sirdaiz

unread,
Nov 19, 2020, 4:44:47 AM11/19/20
to grailsEnCastellano
Hola, estoy intentando usar token en mis formularios:

He intentado lo siguiente:

resources .groovy:

csrfFilter(CsrfFilter, new HttpSessionCsrfTokenRepository()) { accessDeniedHandler = ref('fnAccessDeniedHandler') requireCsrfProtectionMatcher = ref('fnRequireCsrfProtectionMatcher') }


bootsrap.groovy
    def init = { servletContext ->
       SpringSecurityUtils.clientRegisterFilter('csrfFilter', SecurityFilterPosition.PRE_AUTH_FILTER.order)

Pero al intentar desplegar la aplicación tengo este error:

Error initializing the application: Error creating bean with name 'csrfFilter': Cannot resolve reference to bean 'fnAccessDeniedHandler' while setting bean property 'accessDeniedHandler'

Estoy usando:
  compile ":spring-security-core:2.0-RC4"

Gracias de antemano
Reply all
Reply to author
Forward
0 new messages