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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
getLoginPathInfo
(javax.servlet.http.HttpServletRequest request) Gets the path info to be used to redirect after login.Returns the list of prefix for unauthenticated URLs, typically the URLs associated to login prompt.handleLoginPrompt
(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, 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.static boolean
isLoginRequest
(javax.servlet.http.HttpServletRequest request) needLoginPrompt
(javax.servlet.http.HttpServletRequest httpRequest) Defines if the authentication plugin needs to do a login prompt.boolean
onError
(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) Handles the login error response.boolean
onSuccess
(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) Handles login success response.
-
Field Details
-
usernameKey
-
passwordKey
-
LOGIN_KEY
- See Also:
-
-
Constructor Details
-
WebEngineFormAuthenticator
public WebEngineFormAuthenticator()
-
-
Method Details
-
handleLoginPrompt
public Boolean handleLoginPrompt(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String baseURL) Description copied from interface:NuxeoAuthenticationPlugin
Handles the Login Prompt.- Specified by:
handleLoginPrompt
in interfaceNuxeoAuthenticationPlugin
- Parameters:
request
- the requestresponse
- the response- Returns:
- true if AuthFilter must stop execution (ie: login prompt generated a redirect), false otherwise
-
getLoginPathInfo
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:NuxeoAuthenticationPlugin
Retrieves user identification information from the request.- Specified by:
handleRetrieveIdentity
in interfaceNuxeoAuthenticationPlugin
- 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
- 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
-
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
-
onError
public boolean onError(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) Description copied from interface:LoginResponseHandler
Handles the login error response.- Specified by:
onError
in 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:LoginResponseHandler
Handles login success response.- Specified by:
onSuccess
in interfaceLoginResponseHandler
- Parameters:
request
- the HTTP requestresponse
- the HTTP response- Returns:
- true if response was handled, false otherwise
-