I'm using spring security, and I need to get the User domain object in a controller.
If I call SpringSecurityService.getPrincipal()
, I get back an object of type org.codehaus.groovy.grails.plugins.springsecurity.GrailsUser
. However, what I'm looking for is the User domain object I've defined in my Config.groovy
like so:
grails.plugins.springsecurity.userLookup.userDomainClassName = 'project.auth.User'
How can I best get at the User domain object?