AOP Interceptors and Principals
Hi,
I'm trying to migrate an application using EJB 2.1 to Spring. In the old
version, I have a EJB Dispatcher that audits the applicacion. I'm developing an Spring
AOP Interceptor for do something similar, but I don't know how to obtain the user
principal in a simply manner.
Using acegi or web filter that put the user in the current thread would be a
solution. ¿s there a simpler manner to do this?
Thanks
AOP Interceptors and Principals
Hi kravicha,
Thanks for your advice. Using the Servlet security model I can audit the application at http request level.
I'm looking for a system to do the same but at service level.
For example, I could use a Filter that intercept all the request, then capture the principal using one of the methods of the Request Object and put it in the Thread Local. Later, using a AOP interceptor, obtain the user located in the Thread Local and audit the Service Method calls. I think I could use the SecurityContextHolder Object instead of the Thread Local.
Nevertheless I think this is too complicated. Do anybody know a simpler manner to do the same? I'd like anything more "KISS"
Thanks