Class NTLMAuthenticator
- java.lang.Object
-
- org.nuxeo.ecm.platform.ui.web.auth.ntlm.NTLMAuthenticator
-
- All Implemented Interfaces:
NuxeoAuthenticationPlugin
public class NTLMAuthenticator extends Object implements NuxeoAuthenticationPlugin
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringdefaultDomainprotected static StringdomainControllerstatic booleanFORCE_SESSION_CREATIONstatic StringJCIFS_HTTP_DOMAIN_CONTROLLERstatic StringJCIFS_HTTP_LOAD_BALANCEstatic StringJCIFS_NETBIOS_CACHE_POLICYstatic StringJCIFS_SMB_CLIENT_DOMAINstatic StringJCIFS_SMB_CLIENT_SO_TIMEOUTprotected static booleanloadBalancestatic StringNTLM_HTTP_AUTH_SESSION_KEYstatic StringNTLM_HTTP_CHAL_SESSION_KEY
-
Constructor Summary
Constructors Constructor Description NTLMAuthenticator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>getUnAuthenticatedURLPrefix()Returns the list of prefix for unauthenticated URLs, typically the URLs associated to login prompt.BooleanhandleLoginPrompt(javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse, String baseURL)Handles the Login Prompt.UserIdentificationInfohandleRetrieveIdentity(javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse)Retrieves user identification information from the request.voidinitPlugin(Map<String,String> parameters)Initializes the Plugin from parameters set in the XML descriptor.BooleanneedLoginPrompt(javax.servlet.http.HttpServletRequest httpRequest)Defines if the authentication plugin needs to do a login prompt.static jcifs.smb.NtlmPasswordAuthenticationnegotiate(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, boolean skipAuthentication)
-
-
-
Field Detail
-
JCIFS_NETBIOS_CACHE_POLICY
public static final String JCIFS_NETBIOS_CACHE_POLICY
- See Also:
- Constant Field Values
-
JCIFS_SMB_CLIENT_SO_TIMEOUT
public static final String JCIFS_SMB_CLIENT_SO_TIMEOUT
- See Also:
- Constant Field Values
-
JCIFS_HTTP_LOAD_BALANCE
public static final String JCIFS_HTTP_LOAD_BALANCE
- See Also:
- Constant Field Values
-
JCIFS_HTTP_DOMAIN_CONTROLLER
public static final String JCIFS_HTTP_DOMAIN_CONTROLLER
- See Also:
- Constant Field Values
-
JCIFS_SMB_CLIENT_DOMAIN
public static final String JCIFS_SMB_CLIENT_DOMAIN
- See Also:
- Constant Field Values
-
FORCE_SESSION_CREATION
public static final boolean FORCE_SESSION_CREATION
- See Also:
- Constant Field Values
-
NTLM_HTTP_AUTH_SESSION_KEY
public static final String NTLM_HTTP_AUTH_SESSION_KEY
- See Also:
- Constant Field Values
-
NTLM_HTTP_CHAL_SESSION_KEY
public static final String NTLM_HTTP_CHAL_SESSION_KEY
- See Also:
- Constant Field Values
-
defaultDomain
protected static String defaultDomain
-
domainController
protected static String domainController
-
loadBalance
protected static boolean loadBalance
-
-
Method Detail
-
getUnAuthenticatedURLPrefix
public List<String> getUnAuthenticatedURLPrefix()
Description copied from interface:NuxeoAuthenticationPluginReturns the list of prefix for unauthenticated URLs, typically the URLs associated to login prompt.- Specified by:
getUnAuthenticatedURLPrefixin interfaceNuxeoAuthenticationPlugin
-
handleLoginPrompt
public Boolean handleLoginPrompt(javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse, String baseURL)
Description copied from interface:NuxeoAuthenticationPluginHandles the Login Prompt.- Specified by:
handleLoginPromptin interfaceNuxeoAuthenticationPlugin- Parameters:
httpRequest- the requesthttpResponse- the response- Returns:
- true if AuthFilter must stop execution (ie: login prompt generated a redirect), false otherwise
-
handleRetrieveIdentity
public UserIdentificationInfo handleRetrieveIdentity(javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse)
Description copied from interface:NuxeoAuthenticationPluginRetrieves user identification information from the request.- Specified by:
handleRetrieveIdentityin interfaceNuxeoAuthenticationPlugin- Parameters:
httpRequest- the requesthttpResponse- the response
-
initPlugin
public void initPlugin(Map<String,String> parameters)
Description copied from interface:NuxeoAuthenticationPluginInitializes the Plugin from parameters set in the XML descriptor.- Specified by:
initPluginin interfaceNuxeoAuthenticationPlugin
-
needLoginPrompt
public Boolean needLoginPrompt(javax.servlet.http.HttpServletRequest httpRequest)
Description copied from interface:NuxeoAuthenticationPluginDefines if the authentication plugin needs to do a login prompt.- Specified by:
needLoginPromptin interfaceNuxeoAuthenticationPlugin- Returns:
- true if LoginPrompt is used
-
negotiate
public static jcifs.smb.NtlmPasswordAuthentication negotiate(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, boolean skipAuthentication) throws IOException, javax.servlet.ServletException- Throws:
IOExceptionjavax.servlet.ServletException
-
-