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 String
defaultDomain
protected static String
domainController
static boolean
FORCE_SESSION_CREATION
static String
JCIFS_HTTP_DOMAIN_CONTROLLER
static String
JCIFS_HTTP_LOAD_BALANCE
static String
JCIFS_NETBIOS_CACHE_POLICY
static String
JCIFS_SMB_CLIENT_DOMAIN
static String
JCIFS_SMB_CLIENT_SO_TIMEOUT
protected static boolean
loadBalance
static String
NTLM_HTTP_AUTH_SESSION_KEY
static String
NTLM_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.Boolean
handleLoginPrompt(javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse, String baseURL)
Handles the Login Prompt.UserIdentificationInfo
handleRetrieveIdentity(javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse)
Retrieves user identification information from the request.void
initPlugin(Map<String,String> parameters)
Initializes the Plugin from parameters set in the XML descriptor.Boolean
needLoginPrompt(javax.servlet.http.HttpServletRequest httpRequest)
Defines if the authentication plugin needs to do a login prompt.static jcifs.smb.NtlmPasswordAuthentication
negotiate(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:NuxeoAuthenticationPlugin
Returns the list of prefix for unauthenticated URLs, typically the URLs associated to login prompt.- Specified by:
getUnAuthenticatedURLPrefix
in interfaceNuxeoAuthenticationPlugin
-
handleLoginPrompt
public Boolean handleLoginPrompt(javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse, String baseURL)
Description copied from interface:NuxeoAuthenticationPlugin
Handles the Login Prompt.- Specified by:
handleLoginPrompt
in 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:NuxeoAuthenticationPlugin
Retrieves user identification information from the request.- Specified by:
handleRetrieveIdentity
in interfaceNuxeoAuthenticationPlugin
- Parameters:
httpRequest
- the requesthttpResponse
- the response
-
initPlugin
public void initPlugin(Map<String,String> parameters)
Description copied from interface:NuxeoAuthenticationPlugin
Initializes the Plugin from parameters set in the XML descriptor.- Specified by:
initPlugin
in interfaceNuxeoAuthenticationPlugin
-
needLoginPrompt
public Boolean needLoginPrompt(javax.servlet.http.HttpServletRequest httpRequest)
Description copied from interface:NuxeoAuthenticationPlugin
Defines if the authentication plugin needs to do a login prompt.- Specified by:
needLoginPrompt
in 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:
IOException
javax.servlet.ServletException
-
-