After get current user info I store it in session for later use, but most of the situation I need to get current user info not in a servlet context. Such as in non-servlet environment I need to call something like this:
UserUtils.getCurrentUser();
Any ideas on this?
Further question, I use Guice-servlet, maybe there is a way to inject current user?