Interface InterfaceOFBizAuthenticationHandler

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      javax.naming.directory.SearchResult getLdapSearchResult​(java.lang.String username, java.lang.String password, org.w3c.dom.Element rootElement, boolean bindRequired)
      Get LDAP search result from a username, password and configuration.
      java.lang.Object getPartyId​(org.w3c.dom.Element rootElement, javax.naming.directory.SearchResult result)
      Get the party id of a user.
      java.lang.Object getSecurityGroup​(org.w3c.dom.Element rootElement, javax.naming.directory.SearchResult result)
      Get the security group of a user.
      boolean hasLdapLoggedOut​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.w3c.dom.Element rootElement)
      An HTTP WebEvent handler that checks to see is a userLogin is logged out in ldap.
      java.lang.String login​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.w3c.dom.Element rootElement)
      Login a user.
      java.lang.String logout​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.w3c.dom.Element rootElement)
      Logout a user.
    • Method Detail

      • login

        java.lang.String login​(javax.servlet.http.HttpServletRequest request,
                               javax.servlet.http.HttpServletResponse response,
                               org.w3c.dom.Element rootElement)
                        throws java.lang.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:
        java.lang.Exception
      • getSecurityGroup

        java.lang.Object getSecurityGroup​(org.w3c.dom.Element rootElement,
                                          javax.naming.directory.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

        java.lang.Object getPartyId​(org.w3c.dom.Element rootElement,
                                    javax.naming.directory.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

        java.lang.String logout​(javax.servlet.http.HttpServletRequest request,
                                javax.servlet.http.HttpServletResponse response,
                                org.w3c.dom.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

        javax.naming.directory.SearchResult getLdapSearchResult​(java.lang.String username,
                                                                java.lang.String password,
                                                                org.w3c.dom.Element rootElement,
                                                                boolean bindRequired)
                                                         throws javax.naming.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:
        javax.naming.NamingException
      • hasLdapLoggedOut

        boolean hasLdapLoggedOut​(javax.servlet.http.HttpServletRequest request,
                                 javax.servlet.http.HttpServletResponse response,
                                 org.w3c.dom.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.