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
public class DuoFactorsAuthenticator extends FormAuthenticator
Authentication filter handles two factors authentication via Duo- Since:
- 5.9.5
-
-
Field Summary
Fields Modifier and Type Field Description protected static Integer
CACHE_CONCURRENCY_LEVEL
protected static Integer
CACHE_MAXIMUM_SIZE
protected static Integer
CACHE_TIMEOUT
protected static Random
RANDOM
-
Fields inherited from class org.nuxeo.ecm.platform.ui.web.auth.plugins.FormAuthenticator
loginPage, passwordKey, usernameKey
-
-
Constructor Summary
Constructors Constructor Description DuoFactorsAuthenticator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NuxeoPrincipal
createIdentity(String username)
protected String
getRequestedUrl(javax.servlet.http.HttpServletRequest httpRequest)
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.protected NuxeoPrincipal
validateUserIdentity()
-
Methods inherited from class org.nuxeo.ecm.platform.ui.web.auth.plugins.FormAuthenticator
getLoginPage
-
-
-
-
Method Detail
-
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
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
- Overrides:
needLoginPrompt
in classFormAuthenticator
- Returns:
- true if LoginPrompt is used
-
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
- Overrides:
initPlugin
in classFormAuthenticator
-
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
- Overrides:
getUnAuthenticatedURLPrefix
in classFormAuthenticator
-
createIdentity
public NuxeoPrincipal createIdentity(String username) throws LoginException
- Throws:
LoginException
-
validateUserIdentity
protected NuxeoPrincipal validateUserIdentity() throws LoginException
- Throws:
LoginException
-
getRequestedUrl
protected String getRequestedUrl(javax.servlet.http.HttpServletRequest httpRequest)
-
-