tags:

views:

99

answers:

1

I have seen the other questions and reviewed the documentation, but I have not found a clear example or answer.

1) Do I need a new userDetailsService class 2) Do I need a new userDetailsService class AND subclass the GrailsDaoImpl

The documentation for the plugin discusses it but it is just not clear to me?

+1  A: 

You can do either but not both - you need to have one Spring bean named 'userDetailsService' registered. It can be the stock GrailsDaoImpl, or a subclass that's overridden in resources.groovy, or an entirely new class that implements UserDetailsService and is overridden in resources.groovy.

Burt Beckwith
I have written the new userDetailsService, added it to resources groovy.overridden loadDomainUser to access my user informationbut where do I do the second "authentication" to validate the user or reject the user against another piece of data.
Aaron Saunders
See http://blogs.bytecode.com.au/glen/2010/01/15/hacking-custom-authentication-providers-with-grails-spring-security.html
Burt Beckwith
excellent, thanks
Aaron Saunders