Class AutologonAuthenticationManager
- java.lang.Object
-
- org.openbravo.authentication.AuthenticationManager
-
- org.openbravo.authentication.basic.AutologonAuthenticationManager
-
public class AutologonAuthenticationManager extends AuthenticationManager
- Author:
- adrianromero, iperdomo
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.openbravo.authentication.AuthenticationManager
AuthenticationManager.Stateless, AuthenticationManager.UserLoginInfo
-
-
Field Summary
-
Fields inherited from class org.openbravo.authentication.AuthenticationManager
conn, defaultServletUrl, FAILED_SESSION, localAdress, LOGIN_PARAM, loginName, PASSWORD_PARAM, STATELESS_REQUEST_PARAMETER
-
-
Constructor Summary
Constructors Constructor Description AutologonAuthenticationManager()
AutologonAuthenticationManager(javax.servlet.http.HttpServlet s)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
doAuthenticate(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Called from the authenticate method makes the necessary processing to check if the request is authenticated or not.protected void
doLogout(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Method called from the logout method after clearing all session attributes.void
init(javax.servlet.http.HttpServlet s)
boolean
useExternalLoginPage()
This method can be overridden by those subclasses that expect to retrieve the authentication result from an external login page.-
Methods inherited from class org.openbravo.authentication.AuthenticationManager
authenticate, bdErrorAjax, checkUserPassword, connectorAuthenticate, connectorAuthenticate, createDBSession, createDBSession, decodeBasicAuthenticationData, doWebServiceAuthenticate, doWebServiceAuthenticate, getAuthenticationManager, getLoginURL, isStatelessRequest, isStatelessService, logout, markRequestAsSelfAuthenticated, updateDBSession, webServiceAuthenticate, webServiceAuthenticate
-
-
-
-
Constructor Detail
-
AutologonAuthenticationManager
public AutologonAuthenticationManager()
-
AutologonAuthenticationManager
public AutologonAuthenticationManager(javax.servlet.http.HttpServlet s) throws AuthenticationException
- Throws:
AuthenticationException
-
-
Method Detail
-
init
public void init(javax.servlet.http.HttpServlet s) throws AuthenticationException
- Overrides:
init
in classAuthenticationManager
- Throws:
AuthenticationException
-
doLogout
protected void doLogout(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
Description copied from class:AuthenticationManager
Method called from the logout method after clearing all session attributes. The usual process is to redirect the user to the login page- Specified by:
doLogout
in classAuthenticationManager
- Parameters:
request
- HTTP request objectresponse
- HTTP response object- Throws:
javax.servlet.ServletException
IOException
-
doAuthenticate
protected String doAuthenticate(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws AuthenticationException, javax.servlet.ServletException, IOException
Description copied from class:AuthenticationManager
Called from the authenticate method makes the necessary processing to check if the request is authenticated or not. The simplest way to check is if the #Authenticated_user session attribute is present and return it.- Specified by:
doAuthenticate
in classAuthenticationManager
- Parameters:
request
- HTTP request object, used for handling parameters and session attributes- Returns:
- The user id (AD_User_ID) if the request is already authenticated or the authentication process succeeded
- null if the request is not authenticated or authentication process failed (e.g. wrong password)
- Throws:
AuthenticationException
javax.servlet.ServletException
IOException
- See Also:
DefaultAuthenticationManager
-
useExternalLoginPage
public boolean useExternalLoginPage()
Description copied from class:AuthenticationManager
This method can be overridden by those subclasses that expect to retrieve the authentication result from an external login page.- Overrides:
useExternalLoginPage
in classAuthenticationManager
- Returns:
true
if the authentication result is retrieved from an external login page. Otherwise, returnfalse
which is the value returned by default.
-
-