Package org.nuxeo.duoweb.authentication
Class DuoFactorsAuthenticator
java.lang.Object
org.nuxeo.ecm.platform.ui.web.auth.plugins.FormAuthenticator
org.nuxeo.duoweb.authentication.DuoFactorsAuthenticator
- All Implemented Interfaces:
NuxeoAuthenticationPlugin
Authentication filter handles two factors authentication via Duo
- Since:
- 5.9.5
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final Integer
protected static final Integer
protected static final Integer
protected static final Random
Fields inherited from class org.nuxeo.ecm.platform.ui.web.auth.plugins.FormAuthenticator
loginPage, passwordKey, usernameKey
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateIdentity
(String username) protected String
getRequestedUrl
(javax.servlet.http.HttpServletRequest httpRequest) Returns the list of prefix for unauthenticated URLs, typically the URLs associated to login prompt.handleLoginPrompt
(javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse, String baseURL) Handles the Login Prompt.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.needLoginPrompt
(javax.servlet.http.HttpServletRequest httpRequest) Defines if the authentication plugin needs to do a login prompt.protected NuxeoPrincipal
Methods inherited from class org.nuxeo.ecm.platform.ui.web.auth.plugins.FormAuthenticator
getLoginPage
-
Field Details
-
RANDOM
-
CACHE_CONCURRENCY_LEVEL
-
CACHE_MAXIMUM_SIZE
-
CACHE_TIMEOUT
-
-
Constructor Details
-
DuoFactorsAuthenticator
public DuoFactorsAuthenticator()
-
-
Method Details
-
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
- Overrides:
handleLoginPrompt
in classFormAuthenticator
- 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
- Overrides:
handleRetrieveIdentity
in classFormAuthenticator
- Parameters:
httpRequest
- the requesthttpResponse
- the response
-
needLoginPrompt
Description copied from interface:NuxeoAuthenticationPlugin
Defines if the authentication plugin needs to do a login prompt.- Specified by:
needLoginPrompt
in interfaceNuxeoAuthenticationPlugin
- Overrides:
needLoginPrompt
in classFormAuthenticator
- Returns:
- true if LoginPrompt is used
-
initPlugin
Description copied from interface:NuxeoAuthenticationPlugin
Initializes the Plugin from parameters set in the XML descriptor.- Specified by:
initPlugin
in interfaceNuxeoAuthenticationPlugin
- Overrides:
initPlugin
in classFormAuthenticator
-
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
- Overrides:
getUnAuthenticatedURLPrefix
in classFormAuthenticator
-
createIdentity
- Throws:
LoginException
-
validateUserIdentity
- Throws:
LoginException
-
getRequestedUrl
-