Class ExternalLoginKeysManager


public class ExternalLoginKeysManager extends Object
This class manages the single sign-on authentication through external login keys between OFBiz applications.
  • Constructor Details

    • ExternalLoginKeysManager

      public ExternalLoginKeysManager()
  • Method Details

    • getExternalLoginKey

      public static String getExternalLoginKey(HttpServletRequest request)
      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.
      request - - the http request in which the authentication token is searched and stored
      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.
      request - - the http request object
      response - - the http response object
      "success" in all the cases
    • isExternalLoginKeyEnabled

      public static boolean isExternalLoginKeyEnabled(HttpServletRequest request)
      Check if using externalLoginKey