org.ntlmv2.filter
Class NtlmFilter

java.lang.Object
  extended by org.ntlmv2.filter.NtlmFilter
All Implemented Interfaces:
javax.servlet.Filter

public class NtlmFilter
extends Object
implements javax.servlet.Filter

Simplified NTLMv2 authentication filter, based on the original com.liferay.portal.servlet.filters.sso.ntlm.NtlmFilter. The main purpose of this filter is to provide an example for the bare minimum required to create a working NTLMv2 authentication SSO filter, based on JCIFS, with some extensions from the Liferay product.

For references, please read the Liferay product documentation:

www.liferay.com

The main reason for not using the unchanged code from within the Liferay jar libraries is that they contain dependencies to utility and configuration code of the Liferay server, which makes using them outside of Liferay pretty much impossible. However, I tried to make as few changes as possible.

Credit where credit is due, so I also left all the author tags of the original authors in the classes copied from Liferay.

Author:
Marcel Schoen, Bruno Farache, Marcus Schmidke, Brian Wing Shun Chan, Wesley Gong, Marcellus Tavares, Michael C. Han

Field Summary
static String CACHE_NAME
          Name of cache.
 
Constructor Summary
NtlmFilter()
           
 
Method Summary
 void destroy()
           
 void doFilter(javax.servlet.ServletRequest req, javax.servlet.ServletResponse res, javax.servlet.FilterChain filterChain)
           
 void init(javax.servlet.FilterConfig filterConfig)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CACHE_NAME

public static final String CACHE_NAME
Name of cache.

See Also:
Constant Field Values
Constructor Detail

NtlmFilter

public NtlmFilter()
Method Detail

init

public void init(javax.servlet.FilterConfig filterConfig)
          throws javax.servlet.ServletException
Specified by:
init in interface javax.servlet.Filter
Throws:
javax.servlet.ServletException

doFilter

public void doFilter(javax.servlet.ServletRequest req,
                     javax.servlet.ServletResponse res,
                     javax.servlet.FilterChain filterChain)
              throws IOException,
                     javax.servlet.ServletException
Specified by:
doFilter in interface javax.servlet.Filter
Throws:
IOException
javax.servlet.ServletException

destroy

public void destroy()
Specified by:
destroy in interface javax.servlet.Filter


Copyright © 2012. All Rights Reserved.