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;
}