Package org.openbravo.authentication

Examples of org.openbravo.authentication.AuthenticationException


      m_sAutologonUsername = ConfigParameters.retrieveFrom(s.getServletContext()).getOBProperty(
          "authentication.autologon.username");
      try {
        m_sUserId = AuthenticationData.getUserId(conn, m_sAutologonUsername);
      } catch (ServletException e) {
        throw new AuthenticationException("Cannot authenticate user: " + m_sAutologonUsername, e);
      }

    } else {
      throw new AuthenticationException("Connection provider required for Autologon authentication");
    }
  }
View Full Code Here


  public String authenticate(HttpServletRequest request, HttpServletResponse response)
      throws AuthenticationException, ServletException, IOException {

    if (m_sUserId == null || m_sUserId.equals("") || m_sUserId.equals("-1")) {
      if (m_sAutologonUsername == null || m_sAutologonUsername.equals("")) {
        throw new AuthenticationException("Autologon user emtpy.");
      } else {
        throw new AuthenticationException("Autologon user is not an Openbravo ERP user: "
            + m_sAutologonUsername);
      }
    } else {
      return m_sUserId;
    }
View Full Code Here

    if (s instanceof ConnectionProvider) {
      conn = (ConnectionProvider) s;
      strServletSinIdentificar = s.getServletConfig().getServletContext().getInitParameter(
          "ServletSinIdentificar");
    } else {
      throw new AuthenticationException("Connection provider required for default authentication");
    }
  }
View Full Code Here

    // TODO: Read LAM configuration.
    if (s instanceof ConnectionProvider) {
      conn = (ConnectionProvider) s;
    } else {
      throw new AuthenticationException("Connection provider required for LAM authentication");
    }
  }
View Full Code Here

      if (sUserName == null || sUserName.equals("")) {
        return null;
      } else {
        String sUserId = AuthenticationData.getUserId(conn, sUserName);
        if ("-1".equals(sUserId)) {
          throw new AuthenticationException("Authenticated user is not an Openbravo ERP user: "
              + sUserName);
        }
        return sUserId;
      }
    } catch (XmlRpcException e) {
View Full Code Here

TOP

Related Classes of org.openbravo.authentication.AuthenticationException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.