Hi! I'm overriding the doFilter()-method of NegotiateSecurityFilter.java (due to the fact that I need to set additional session attributes associated with the user).
For the case if a user cannot be authenticated I want some action to be occured (like appearing of a login-form for basic authorization or url redirection. This I would like to implement directly in the filter).
But: I cannot override sendUnauthorized(HttpServletResponse, boolean close) becouse it's private.
So, how can I query the response (HttpServletResponse response) to get header values and to check whether the "401 Unauthorized" appears? And are there some another solutions how to avoid the invocation of "sendUnauthorized"