Interface InterfaceOFBizAuthenticationHandler

All Known Implementing Classes:
AbstractOFBizAuthenticationHandler, OFBizActiveDirectoryAuthenticationHandler, OFBizCasAuthenticationHandler, OFBizLdapAuthenticationHandler

public interface InterfaceOFBizAuthenticationHandler
The OFBiz LDAP Authentication Handler interface.

  • Method Details

    • login

      String login(HttpServletRequest request, HttpServletResponse response, Element rootElement) throws Exception
      Login a user.
      Parameters:
      request - HttpServletRequest
      response - HttpServletResponse
      rootElement - Element root element of ldap config file
      Returns:
      success if the user can login successfully; otherwise, error.
      Throws:
      Exception
    • getSecurityGroup

      Object getSecurityGroup(Element rootElement, SearchResult result)
      Get the security group of a user.
      Parameters:
      rootElement - Element root element of ldap config file
      result - SearchResult
      Returns:
      the SecurityGroup object.
    • getPartyId

      Object getPartyId(Element rootElement, SearchResult result)
      Get the party id of a user.
      Parameters:
      rootElement - Element root element of ldap config file
      result - SearchResult
      Returns:
      the PartyId object.
    • logout

      String logout(HttpServletRequest request, HttpServletResponse response, Element rootElement)
      Logout a user.
      Parameters:
      request - HttpServletRequest
      response - HttpServletResponse
      rootElement - Element root element of ldap config file
      Returns:
      success if the user can login successfully; otherwise, error.
    • getLdapSearchResult

      SearchResult getLdapSearchResult(String username, String password, Element rootElement, boolean bindRequired) throws NamingException
      Get LDAP search result from a username, password and configuration.
      Parameters:
      username - String
      password - String
      rootElement - Element root element of ldap config file
      bindRequired - boolean if true, bind; false, just search the user in LDAP
      Returns:
      result SearchResult if ldap search successfully; otherwise, null.
      Throws:
      NamingException
    • hasLdapLoggedOut

      boolean hasLdapLoggedOut(HttpServletRequest request, HttpServletResponse response, Element rootElement)
      An HTTP WebEvent handler that checks to see is a userLogin is logged out in ldap. If yes, the user is forwarded to the login page. Currently, this function is only used in CAS authentication handler.
      Parameters:
      request - The HTTP request object for the current JSP or Servlet request.
      response - The HTTP response object for the current JSP or Servlet request.
      rootElement - Element root element of ldap config file
      Returns:
      true if the user has logged out from ldap; otherwise, false.