Class AbstractOFBizAuthenticationHandler

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract 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​(HttpServletRequest request, HttpServletResponse response, org.w3c.dom.Element rootElement)
      An HTTP WebEvent handler that checks to see is a userLogin is logged out.
      java.lang.String login​(HttpServletRequest request, HttpServletResponse response, java.lang.String username, java.lang.String password, org.w3c.dom.Element rootElement, javax.naming.directory.SearchResult result)  
      java.lang.String login​(HttpServletRequest request, HttpServletResponse response, org.w3c.dom.Element rootElement)
      Login a user.
      java.lang.String logout​(HttpServletRequest request, HttpServletResponse response, org.w3c.dom.Element rootElement)
      Logout a user.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AbstractOFBizAuthenticationHandler

        public AbstractOFBizAuthenticationHandler()
        Public constructor, initializes some required member variables.

    • Method Detail

      • getPartyId

        public java.lang.Object getPartyId​(org.w3c.dom.Element rootElement,
                                           javax.naming.directory.SearchResult result)
        Description copied from interface: InterfaceOFBizAuthenticationHandler
        Get the party id of a user.
        Specified by:
        getPartyId in interface InterfaceOFBizAuthenticationHandler
        Parameters:
        rootElement - Element root element of ldap config file
        result - SearchResult
        Returns:
        the PartyId object.
      • getSecurityGroup

        public java.lang.Object getSecurityGroup​(org.w3c.dom.Element rootElement,
                                                 javax.naming.directory.SearchResult result)
        Description copied from interface: InterfaceOFBizAuthenticationHandler
        Get the security group of a user.
        Specified by:
        getSecurityGroup in interface InterfaceOFBizAuthenticationHandler
        Parameters:
        rootElement - Element root element of ldap config file
        result - SearchResult
        Returns:
        the SecurityGroup object.
      • getLdapSearchResult

        public abstract javax.naming.directory.SearchResult getLdapSearchResult​(java.lang.String username,
                                                                                java.lang.String password,
                                                                                org.w3c.dom.Element rootElement,
                                                                                boolean bindRequired)
                                                                         throws javax.naming.NamingException
        Description copied from interface: InterfaceOFBizAuthenticationHandler
        Get LDAP search result from a username, password and configuration.
        Specified by:
        getLdapSearchResult in interface InterfaceOFBizAuthenticationHandler
        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
      • login

        public java.lang.String login​(HttpServletRequest request,
                                      HttpServletResponse response,
                                      java.lang.String username,
                                      java.lang.String password,
                                      org.w3c.dom.Element rootElement,
                                      javax.naming.directory.SearchResult result)
                               throws java.lang.Exception
        Throws:
        java.lang.Exception
      • hasLdapLoggedOut

        public boolean hasLdapLoggedOut​(HttpServletRequest request,
                                        HttpServletResponse response,
                                        org.w3c.dom.Element rootElement)
        An HTTP WebEvent handler that checks to see is a userLogin is logged out. If yes, the user is forwarded to the login page.
        Specified by:
        hasLdapLoggedOut in interface InterfaceOFBizAuthenticationHandler
        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.