if you want to access the UserDetails
instance not from Grails artifact, you have 3 options:
1) you can pass springSecurityService
as a method argument or get it from grailsApplication
or applicationContext
as a spring-bean. As soon as you have the service at hand, you can call springSecurityService.currentUser
to get the user details
2) you can grab it out of httpSession
by SPRING_SECURITY_CONTEXT
as a session attribute.
3) you can grab it from ThreadLocal
variable via SecurityContextHolder.context.authentication