1

I use custom implementation for Spring Security Plugin to override a default loadUser function. I read this manual https://grails-plugins.github.io/grails-spring-security-core/guide/userDetailsService.html and this is my resources.groovy file:

package spring

import security.ExtendedUserDetails
beans = {
  UserDetailsService(ExtendedUserDetails)
}

but it was didn't loaded. App still use a default puligin implementation GormUserDetailsService. I use debugger and I see that ExtendedUserDetails never run.

So what's wrong?

This question is unanswered yet Custom UserDetailsService Not Being Called - Grails & Spring Security Core

Community
  • 1
  • 1
Alex Shwarc
  • 822
  • 10
  • 20

1 Answers1

1

Looks like there is a typo in your bean name in resources.groovy. The name must be userDetailsService not UserDetailsService (capital U) and ExtendedUserDetails must implement GrailsUserDetailsService.

Shashank Agrawal
  • 25,161
  • 11
  • 89
  • 121