This implementation of {@link UserProvider} is very useful if authentication has been implemented using a servletfilter. It allows to store the current user in a {@link ThreadLocal} for the active thread. See the following code for anexample for how to user this class.
FeatureUser user = .... ThreadLocalFeatureUserProvider.bind(user); try { chain.doFilter(request, response); } finally { ThreadLocalFeatureUserProvider.release(); }
Please not that it is very important to remove the user from the provider after
@author Christian Kaltepoth