jcifs.http
Class NtlmHttpFilter
java.lang.Object
jcifs.http.NtlmHttpFilter
- Filter
public class NtlmHttpFilter
extends java.lang.Object
implements Filter
This servlet Filter can be used to negotiate password hashes with
MSIE clients using NTLM SSP. This is similar to
Authentication:
BASIC but weakly encrypted and without requiring the user to re-supply
authentication credentials.
Read
jCIFS NTLM HTTP Authentication and the Network Explorer Servlet for complete details.
void | destroy()
|
void | doFilter(ServletRequest request, ServletResponse response, FilterChain chain) - This method simply calls negotiate( req, resp, false )
and then chain.doFilter.
|
FilterConfig | getFilterConfig()
|
void | init(FilterConfig filterConfig)
|
protected NtlmPasswordAuthentication | negotiate(HttpServletRequest req, HttpServletResponse resp, boolean skipAuthentication) - Negotiate password hashes with MSIE clients using NTLM SSP
|
void | setFilterConfig(FilterConfig f)
|
destroy
public void destroy()
doFilter
public void doFilter(ServletRequest request,
ServletResponse response,
FilterChain chain)
throws IOException,
ServletException
This method simply calls negotiate( req, resp, false )
and then chain.doFilter. You can override and call
negotiate manually to achive a variety of different behavior.
getFilterConfig
public FilterConfig getFilterConfig()
init
public void init(FilterConfig filterConfig)
throws ServletException
negotiate
protected NtlmPasswordAuthentication negotiate(HttpServletRequest req,
HttpServletResponse resp,
boolean skipAuthentication)
throws IOException,
ServletException
Negotiate password hashes with MSIE clients using NTLM SSP
req
- The servlet requestresp
- The servlet responseskipAuthentication
- If true the negotiation is only done if it is
initiated by the client (MSIE post requests after successful NTLM SSP
authentication). If false and the user has not been authenticated yet
the client will be forced to send an authentication (server sends
HttpServletResponse.SC_UNAUTHORIZED).
- True if the negotiation is complete, otherwise false
setFilterConfig
public void setFilterConfig(FilterConfig f)