Package org.nuxeo.ecm.webengine.login
Class WebEngineFormAuthenticator
- java.lang.Object
-
- org.nuxeo.ecm.webengine.login.WebEngineFormAuthenticator
-
- All Implemented Interfaces:
LoginResponseHandler,NuxeoAuthenticationPlugin
public class WebEngineFormAuthenticator extends Object implements NuxeoAuthenticationPlugin, LoginResponseHandler
-
-
Field Summary
Fields Modifier and Type Field Description static StringLOGIN_KEYprotected StringpasswordKeyprotected StringusernameKey
-
Constructor Summary
Constructors Constructor Description WebEngineFormAuthenticator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringgetLoginPathInfo(javax.servlet.http.HttpServletRequest request)Gets the path info to be used to redirect after login.List<String>getUnAuthenticatedURLPrefix()Returns the list of prefix for unauthenticated URLs, typically the URLs associated to login prompt.BooleanhandleLoginPrompt(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, 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.static booleanisLoginRequest(javax.servlet.http.HttpServletRequest request)BooleanneedLoginPrompt(javax.servlet.http.HttpServletRequest httpRequest)Defines if the authentication plugin needs to do a login prompt.booleanonError(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)Handles the login error response.booleanonSuccess(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)Handles login success response.
-
-
-
Field Detail
-
usernameKey
protected String usernameKey
-
passwordKey
protected String passwordKey
-
LOGIN_KEY
public static final String LOGIN_KEY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
WebEngineFormAuthenticator
public WebEngineFormAuthenticator()
-
-
Method Detail
-
handleLoginPrompt
public Boolean handleLoginPrompt(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String baseURL)
Description copied from interface:NuxeoAuthenticationPluginHandles the Login Prompt.- Specified by:
handleLoginPromptin interfaceNuxeoAuthenticationPlugin- Parameters:
request- the requestresponse- the response- Returns:
- true if AuthFilter must stop execution (ie: login prompt generated a redirect), false otherwise
-
getLoginPathInfo
protected String getLoginPathInfo(javax.servlet.http.HttpServletRequest request)
Gets the path info to be used to redirect after login.
-
isLoginRequest
public static boolean isLoginRequest(javax.servlet.http.HttpServletRequest request)
-
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
-
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
-
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
-
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
-
onError
public boolean onError(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Description copied from interface:LoginResponseHandlerHandles the login error response.- Specified by:
onErrorin interfaceLoginResponseHandler- Parameters:
request- the HTTP requestresponse- the HTTP response- Returns:
- true if error was handled, false otherwise
-
onSuccess
public boolean onSuccess(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Description copied from interface:LoginResponseHandlerHandles login success response.- Specified by:
onSuccessin interfaceLoginResponseHandler- Parameters:
request- the HTTP requestresponse- the HTTP response- Returns:
- true if response was handled, false otherwise
-
-