I'm wrapping up an implementation of Spring Security in Grails. This is my first implementation on Spring Security- previously I used Acegi.
Here's the problem I'm having. In Acegi, I was able to retrieve the authenticated user in the onInteractiveAuthenticationSuccessEvent() callback by accessing the SecurityContextHolder, getting the user principle, and then getting the 'live' User from the database. In Spring Security, the SecurityContextHolder does not seem to be available- when I try to access it, I get low level Grails complaints about no such method on such and such object.
So, my questions:
How can I access SecurityContextHolder from onInteractiveAuthenticationSuccessEvent
Or is there a better way of getting the authenticated principle?
Thanks, Dan