Spring NTLM NtlmProcessingFilter do cache
does anyone tried doing cache for spring-ntlm NtlmProcessingFilter.java file so that every request no n开发者_如何学编程eed to query from microsoft active directory to authenticate user ? how to implement such cache using ehcache
I can't help you directly, but some of my experience may be useful. I have an application that uses a modified jcifs ntlm filter. (Beware that the existing filter is not actually secure!) One of my modifications is that once the user is authenticated, the results are stored in the session (not specifically in the cache).
The filter checks to see if there's an authentication result in the session before doing the whole ntlm protocol. If there is, then it doesn't need to bother.
The only thing you need to be careful about is HTTP Posts. Internet Explorer requires that Posts go through the whole authentication process anyway, whether or not the server asks for it. So you have to take care of that in your filter.
精彩评论