Commit 9073e3a1 by WeiCong

屏蔽登陆dn验证

parent ecfc244e
......@@ -172,8 +172,8 @@ public class DatabaseLoginContextForELCS extends AbstractLoginContext {
this._userName = null;
String userName = getParameter(parameterMap, "j_username");
String password = getParameter(parameterMap, "j_password");
String dncode = getParameter(parameterMap, "j_dncode");
if (userName == null || password == null || dncode==null ){
// String dncode = getParameter(parameterMap, "j_dncode");
if (userName == null || password == null /*|| dncode==null*/ ){
parameterMap.put(ERROR, ErrorCode.LOGIN_PARAMETER_CHECK);
return setLogon(false, userName, ERROR_USERNAME_PASSWORD, "用户名或密码为空.", null, null);
}
......@@ -218,10 +218,10 @@ public class DatabaseLoginContextForELCS extends AbstractLoginContext {
} else if (!STATUS_NORMAL.equals(userState)){//非0:正常;1:注销;2:锁定,不可登录,
parameterMap.put(ERROR, ErrorCode.LOGIN_STATE_ABNORMAL_ERROR);
return setLogon(false, userName, ErrorCode.LOGIN_STATE_ABNORMAL_ERROR.getCode(), ErrorCode.LOGIN_STATE_ABNORMAL_ERROR.getMessage(), stmt, rs);
} else if (!Objects.equals(ukey,dncode)) {//dn码错误
} /*else if (!Objects.equals(ukey,dncode)) {//dn码错误
parameterMap.put(ERROR, ErrorCode.LOGIN_DN_ERROR);
return setLogon(false, userName, ErrorCode.LOGIN_DN_ERROR.getCode(), ErrorCode.LOGIN_DN_ERROR.getMessage(), stmt, rs);
} else if (Objects.nonNull(errorStr)) {
}*/ else if (Objects.nonNull(errorStr)) {
// 校验密码
sql = "UPDATE usr SET fltcnt=?,sta=?,lstfltdattim=? WHERE inr=?";
stmt = conn.prepareStatement(sql);
......
package org.sss.presentation.noui.controller;
import java.util.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import log.Log;
import log.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
......@@ -16,7 +10,6 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.sss.common.model.ILoginContext;
import org.sss.common.model.IMenuItem;
import org.sss.presentation.noui.api.exception.NoUiException;
import org.sss.presentation.noui.api.model.Menu;
import org.sss.presentation.noui.api.request.NoUiRequest;
import org.sss.presentation.noui.api.response.ErrorCode;
......@@ -35,6 +28,10 @@ import org.sss.presentation.noui.util.NumericUtil;
import org.sss.presentation.noui.util.RedisUtil;
import org.sss.presentation.noui.util.StringUtil;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import java.util.*;
@Controller
public class LoginController {
private static final Log log = LogFactory.getLog(LoginController.class);
......@@ -53,10 +50,10 @@ public class LoginController {
Map<String, Object> map = new HashMap<>();//此map会存储返回错误码
String userId = noUiRequest.getDataMap().get(Constants.USERNAME).toString();
String password = noUiRequest.getDataMap().get(Constants.PASSWORD).toString();
String dncode = noUiRequest.getDataMap().get(Constants.DNCODE).toString();
// String dncode = noUiRequest.getDataMap().get(Constants.DNCODE).toString();
map.put("j_username", userId);
map.put("j_password", password);
map.put("j_dncode", dncode);
// map.put("j_dncode", dncode);
NoUiContext context = NoUiContextManager.createNoUiContext(noUiRequest);
try {
if (context.getSession().login(map)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment