Package org.apache.ofbiz.webapp.control
Class ExternalLoginKeysManager
java.lang.Object
org.apache.ofbiz.webapp.control.ExternalLoginKeysManager
This class manages the single sign-on authentication through external login keys between OFBiz applications.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
checkExternalLoginKey
(HttpServletRequest request, HttpServletResponse response) OFBiz controller event that performs the user authentication using the authentication token.static String
getExternalLoginKey
(HttpServletRequest request) Gets (and creates if necessary) an authentication token to be used for an external login parameter.static boolean
Check if using externalLoginKey
-
Constructor Details
-
ExternalLoginKeysManager
public ExternalLoginKeysManager()
-
-
Method Details
-
getExternalLoginKey
Gets (and creates if necessary) an authentication token to be used for an external login parameter. When a new token is created, it is persisted in the web session and in the web request and map entry keyed by the token and valued by a userLogin object is added to a map that is looked up for subsequent requests.- Parameters:
request
- - the http request in which the authentication token is searched and stored- Returns:
- the authentication token as persisted in the session and request objects
-
checkExternalLoginKey
public static String checkExternalLoginKey(HttpServletRequest request, HttpServletResponse response) OFBiz controller event that performs the user authentication using the authentication token. The method is designed to be used in a chain of controller preprocessor event: it always return "success" even when the authentication token is missing or the authentication fails in order to move the processing to the next event in the chain.- Parameters:
request
- - the http request objectresponse
- - the http response object- Returns:
- "success" in all the cases
-
isExternalLoginKeyEnabled
Check if using externalLoginKey- Returns:
-