Issue
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
Solution
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
.
Answered By - Shashank Agrawal
Answer Checked By - Timothy Miller (JavaFixing Admin)